BMPs vs JPGs
Miscellaneous Forums/General Discussion/BMPs vs JPGs
as far as using one over the other as textures to your game objects... what are the implications...
right off the bat, it seems as if jpgs require less memory... what about performance and other unforseen stuff...
thx
--Mike
well they might look crap for a start due to (lossy) compression.
.Png is the experts choice ;-)
All image/texture formats occupy the same amount of memory when loaded. Using a compressed format over one that isn't simply save disk space.
PNG and TGA have an alpha channel, though.
.png for me too
also remember this,... any image will require the same amount of memory once loaded, so the compression will only save disk space. (in other words, making that .jpg as small as posible won't gain you a thing once it is loaded into memory)
.pngs are great because:
they can be compressed (lossless)
they have alpha
they can be lower bit depth (only a disk space thing, but useful)
Don't .jpg files have some patent issues with them? I would avoid using .jpg and .mp3 files in any commercial project unless you don't mind paying and instant $10,000 for a license.
Ping!
Don't .jpg files have some patent issues with them? I would avoid using .jpg and .mp3 files in any commercial project unless you don't mind paying and instant $10,000 for a license.
Talking about that, would that apply for website designers? Most web images are in .jpg (and flash components use .mp3 files )and if a company is selling a service to design a websites whether from pre-designed templates or custom templates, would this licensing apply? If so, there would be no point in designing websites because no website would sell for $10,000 in the first place.
thx guys... the jpg is really owned and the owners are actually enforcing their options huh... i didn't know that...
thx again
--Mike
my understanding on the .jpg thing is that it only applies to the writing of the .jpg files, so it would apply more to hardware (digital cameras) or software that writes the format, not the actual using the files.
Hopefully someone here know more than me on this.
go jpeg2000, it's now got support (beta) in BlitzMax.
Pongo: Pretty sure you're right...
Also, IIRC the patent is near the end of its lifespan already anyway, would expire in the next year or so?
actually theres another benifit in using Jpeg or PNG over BMP or TGAs, they are much faster to load because HD to memory is slower then memory to CPU
But BMP or TGA have trivial compression, which is a lot less CPU intensive to decode,making the actual speed difference negligible.
TigerZ makes a good point. The smaller the hard disc space, the quicker it is to load to memory, where the decompression is the trival part. If you have a .jpg texture that's 100 KB, and a bitmap texture that's 2-3 MB, then it's quite a difference. Never use JPG's for textures that you need the details to remain, such as normal maps or heightmaps, because of the detail lose, when saved.
Another obvious point - don't use jpegs for textures/images which have transparency - unless of course you use a separate png for the transparency part and combine them in code.
On some systems bmp will load faster than jpg as HD burst acess can be pretty good, and there's no decompression to do - it's all a matter of internal memory formats and the variable speed of your hard disks seek time. The actuall IDE bus transfer is pretty quick.
I use tga in development, but i've now got my own disk format for when I make stuff public. It compresses almost aswell as jpg and is lossless, the hit is on loading times although isn't too bad ... The real slow bit is saving the images to the format in the first place as I didn't optimise that.
In 2002 Forgent Networks asserted that it owns and will enforce patent rights on the JPEG technology, arising from a patent that had been filed in 1986 (U.S. Patent 4,698,672). The announcement has created a furor reminiscent of Unisys' attempts to assert its rights over the GIF image compression standard.
The JPEG committee investigated the patent claims in 2002 and are of the opinion that they were invalidated by prior art. [1] Others have also concluded that Forgent doesn't have a patent that covers JPEG. [2] Nevertheless, between 2002 and 2004 Forgent was able to obtain about $90 million by licensing their patent to some 30 companies. In April 2004 Forgent sued 31 other companies to enforce further license payments. In July of the same year, a consortium of 21 large computer companies filed a countersuit, with the goal of invalidating the patent. Surprisingly, in contrast to the other major computer companies such as Sony and Philips, Microsoft has launched a major lawsuit against Forgent. As of February 2006, the United States Patent and Trademark Office has agreed to re-examine Forgent's JPEG patent at the request of the Public Patent Foundation (Published news article). In principle, the Forgent US patent will expire in 2006. Forgent also possesses a similar patent granted by the European Patent Office in 1994, though it is unclear how enforceable it is.[3]
---------------
However, as far as I see they only sue companies with software that is COMPRESSING to jpg, while DECOMPRESSING is practically in the public domain.
For Textures a 100% quality JPG may be good enough. Using lossy formats (even 100% jpgs) will reduce the image quality especially when it's resampled and saved as jpg multiple times (jpg degeneration).
lots of information... THANKS ALL...
jfk... that's the latest info i had as well... they're not gonna chase down a lil ole indie like me... ahhh, who knows... i've gotta think it over...
--Mike
Well, for what it is worth - I nearly always use .png and .tga textures - to the point of converting a .jpg or a .bmp into one.
I also exclusively use 'Johnson's' baby oil - 20 fl oz one.
you can't fry bacon in Johnson's baby oil... you dummeee :)
--Mike
Puki-
Think before you sausage.
I mean post.