Template talk:ShouldBeJPEG

From Wikipedia, the free encyclopedia

[edit] I just created this template, but it needs an image

I created this template based on {{ShouldBePNG}} as I found a recently uploaded GIF that should have been JPEG. However, the resultant template needs a new image. I am a lousy artist and didn't attempt to create the image. Please feel free to add it yourself. Will (Talk - contribs) 06:23, 21 December 2006 (UTC)

Fixed wording above. BTW: If the wording in the template needs help, please say so. Will (Talk - contribs) 05:05, 22 December 2006 (UTC)

[edit] Rationale

Hi, I just noticed a {{ShouldBeJPEG}} tag which someone added to a PNG image I'd uploaded, and was curious about the rationale behind it. Is there someplace where this has been discussed? The tag's text says that the JPEG format "compresses photos more effectively", which is rather vague and fails to note the lossy nature of this compression or other issues associated with the format. Huwmanbeing  16:21, 16 April 2008 (UTC)

I just ran this comparison between two copies of Quake III Arena q3dm0.png (which was tagged as {{ShouldBeJPG}}) — one was the original PNG, the other was a copy saved as a high-quality JPEG. There's does seem to be some noise, particularly evident above the character's shoulders and around the reticle. Huwmanbeing  21:02, 16 April 2008 (UTC)
Sure. PNG's compression algorithm is based on representing exactly repeated sequences of pixels efficiently, which means that for "photographic" images like this one with very few exactly repeated pixels, it is going to do almost no compression at all. Case in point: This image is 1024x768, with one byte of color information per pixel. Uncompressed that would be 786432 bytes. The PNG version is actually 798846 bytes; larger than raw uncompressed bytes! JPEG's algorithms are efficient at compressing gradations of color because they work on blocks of the image transformed to separate out the low-frequency information from the high-frequency information. JPEG is lossy, but you can (and should) adjust the compression quality such that the lossiness is not noticeable for the particular image. I thought 90% was basically imperceptible for this image, which results in a file less than half the size of the PNG. By the way, this specific PNG file does suffer a loss in quality because you saved it in indexed-color mode, meaning that there are only 256 different color values in the entire image. You could use a 24-bit PNG, but then it would be three times larger! Additionally, if you wanted to increase the quality of this image, a much better step would be to retake the screenshot with full screen antialiasing and anisotropic filtering enabled. Also, make sure r_picmip is set to 0 in Quake 3; these textures look downsampled to me but maybe I'm just misremembering how good (bad) the textures look in that game. — brighterorange (talk) 01:29, 17 April 2008 (UTC)