[insert blogger navbar here]

Random Ramblings

Sunday, 27 December, 2009

RR (19,3,3,1): Image formats

For now, the ideal formats to use are PNG and JPEG. (And also SVG if you like, although as a vector format it isn't used much.) PNG and JPEG are bitmap formats, the former using lossless compression and the latter using lossy compression. Lossy in the sense that low-frequency components get aliased. (That's from a signal processing perspective; from an image processing perspective, the colour fluctuations get less precise.)

This is problematic for things like edges. Edges represent a few high-frequency components and many low-frequency components; by cutting out those low-frequency components the edges will exhibit overshoot and also some ringing. In other words, where the image isn't noisy (such as line art or pixel art or screenshots), PNG should be used since JPEG will introduce ringing. On the other hand, in noisy images such as photographs or screenshots from 3d games (or what-have-you), JPEG is better since the ringing it introduces is often insignificant.

There's also (as I mentioned earlier) SVG, which is good for vector images, but, if I'm not wrong, it's currently only properly supported by Opera and WebKit. (The last time I checked, which was quite long ago, Firefox didn't support SVG in <img>.) Also, it's unlikely vector images are going to get used often. (One of the few use cases I can think of are fonts; but those should be done with a font format and not SVG.)

I felt this post was necessary. Originally this post contained a lot more info, but I trimmed it and split one of the main paragraphs into the above three paragraphs. Without changing anything, because I'm lazy. The text might seem a bit out of place, but I don't really care.

0 Comments:

Post a Comment

<< Home