JPEG's are Evil too.

By Steve Baker


The JPEG image format is fine for storing photographs that are intended to be displayed at reasonably high resolution, directly onto a CRT.

The JPEG image format is very bad news indeed for people who do texture mapping of images onto 3D surface.

So Why Is This A Problem?

The lossiness in JPEG images is a BIG problem for texture mapping because the smarty-pants image compression guru's who worked out the JPEG standard know how the human eye works and know what kind of data they can throw away without the eye noticing it too much.

However, the assumptions they make are that the image is presented at a uniform scale at the designed brightness, with pre-processed gamma correction and at fairly high resolution.

When you stretch the image into perspective, MIPmap it, bilinear-interpolate between texels, modulate it with lighting and generally abuse it like that, all those assumptions go out the window and the missing bits can become very important. As a result, JPEG images can look terrible when used as texture maps.

Don't even think of converting your JPEGs back into something else since if your image has ever been a JPEG at any time in it's past life, it's damaged forever. The image data that JPEG throws away is gone forever - converting back to (say) PNG doesn't restore that lost quality.

The worst part is that you can't even see the damage just by looking at the picture in a paint program - because the oh-so-clever compression tricks are designed to look OK in that setting.

JPEG is great for keeping the bandwidth down in - but not for texture mapping.


Now, it seems that Forgent Networks claim that they own a patent on JPEG compression - so it may be hard to use JPEG's legally without paying some kind of license fee.