File Formats: Why we use certain ones and not others
Posted: Sat Dec 20, 2008 3:24 am
Repost from Stardestroyer.net.
Einhander Sn0m4n wrote:Sample image is a 820x2250 (aka Very Large!) schematic of a thermonuclear railgun projectile, which, in the BMP file format, weighs 5.28MB on disk. This image was chosen to be representative of the output of an advanced MSPaint user in making a starship design. There are gradients and subtle color variations present within the schematic which are not present in the default Paint palette, as you can see. Most ship designers stick to the default Paint palette, which I suspect would give GIF an edge in this test.
The purpose of this experiment is to show which is the best file format to save a schematic of this type through a combination of file size, fidelity in rendition, and ease of data repair.
Schematic saved in MSPaint; default compression JPEG: 94kb; data damage apparent in form of smeared or blurry lines, edges, and fonts.
Schematic saved in Irfanview; default compression (85%) JPEG: 94kb; data damage slightly more visible.
Schematic saved in MSPaint; default compression GIF: 63kb; MASSIVE DAMAGE extremely obvious in the form of color dithering over very nearly the entirety of the schematic! File size is small for an image this size.
Schematic saved in Irfanview; default compression (85%) GIF: 139kb :wtf: Data damage in form of color inaccuracy present, readily seen in the gray gradients. Large file size!
Schematic saved in Irfanview, default compression factor (7) PNG: 26kb! No data damage visible at all due to lossless format. File size is clearly the smallest by a factor of 2.6 to its nearest GIF competition and nearly 4 against the JPEGs.