Archive for February 8th, 2007

A Very Simple Thingy about Image Types

Add a comment

My friend asked me to explain, to explain in 5 minutes or less, the difference between some of the different image file formats! I’ll give it a shot, bare-naked, like.

There’s a crapload of different formats for pictures, and they all save the picture differently. There’s two main kinds, raster and vector.

VECTOR IMAGES

A simple vector image (illustrator, flash type images) contains instructions like this:
“make a point on this white background at co-ords. 10.6″ X 9.4″. inscribe a circle of exactly 4″ radius. Fill this circle with hot pink. Done.”

The more complex the shapes, the bigger the instructions get

RASTER IMAGES (jpeg, gif, tiff, png, bmp)

Imagine a sheet of graph paper.

Now imagine that there’s an image on this graph paper, with each little square being one square dot of colour.

Okay, so a TIFF file, which doesn’t lose quality, goes through the image, one pixel at a time, starting at top left and reading along the line to the right, describing the pixels’ colour one at a time. For every. single. pixel. (row 8763, column 64499, rgb values thus and so)

BMP files do something like the above, as well.

GIF files only describe 256 colours max, and they encode in a tighter way, perfect for line art and cartoons and logos. They describe lines. They say “start here and draw white until you get to this pixel, then draw pink until here, then draw red until here”
You can make gif files encode even less colours, down to 2. this makes ‘em smaller and smaller.

Jpegs encode in a good way for making small files — but bad for quality if you set the quality too low. So, a jpeg at 100% quality will be a large clear file, the same one at 75% quality will be good for web stuff, at 40% quality will look like michael jackson’s nose — all broke up.
It does this by sorta waving in the direction of the image and saying “Oh this section here is kinda greenish, and that one’s pretty blue, oh who cares, really.”

_____________________________________

totally apart from all this, the image size (5″ X 7″ or 8″ x 10″ or…), and the resolution (dpi/lpi… dots per inch or lines per inch) make a big difference to what the final file size is gonna be.

So. format, resolution, file size, image size, color values… all make a difference. Crazy, no?