Don’t Use JPEG For Things It’s Not Good For

Let’s start with the acronym: “Joint Photographic Experts Group”. This is an image format invented by an expert groups of photographers. It’s good for photographs, which have their own “fingerprint”: a vast array of (mostly) continuous blotches of nuanced shades. More over, these photographs need to be transmitted to human beings (at the other side of the screen), who are used to looking in the real world where these photographs are taken. This, by the way, also explains why they have no transparency: photographs do not have transparency.

So when you have a logo or a sign, which tend to be:

  • Sharp divisive lines
  • Few colors
  • Shades which need precise reproduction

JPEG is horribly suited to the task. You will end up cranking the “lossiness” down (usually it’s called “quality” and you’ll crank it up), so it will take waaay more space than it should — and still end up looking like crap.

Here is a Star of David, in PNG form:

The size of the file is <5KB.

Here is the same, saved in JPEG with a quality towards the high-end:

What we got for a nearly 3-times increase in file size is horrible quality.


2 Responses to Don’t Use JPEG For Things It’s Not Good For

  1. Laurens Van Houtven says:

    Hear hear! Or stop pretending IE exists and just use SVG for everything that can be better described as vector than raster anyway.

  2. Jonathan D says:

    Actually, if you use a vector-based rendering format, like postscript, you can produce that exact star-of-david in probably only a few hundred bytes. And at an infinite resolution to boot.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: