|
 |
|
|
by OuTpaTienT
|
|
Naturally JPGs (JPEG) have their uses. And in the proper settings the JPG image format is the best solution for trimming down otherwise large and cumbersome image files. The World Wide Web is a prime example of such a setting. Image quality can take a backseat to the ever important file size. With the proliferation of broadband this is becoming a diminishing concern, but only slightly. And don't fret you 56k'ers, we haven't written you off just yet. We still think about you when designing web sites or web intended graphics. So we squish and squash our images in every way imaginable to bring the file size down. Unfortunately it usually means losing image quality. Such is the evil of trade-offs.
But when you are dealing with images that you value, such as digital photography of your children, an original piece of artwork, or just anything that you don't want to alter then you shouldn't be confronted or burdened with "trade-offs". CD burners are so inexpensive (hard drives too) today, you shouldn't let the image quality of your prized photos suffer simply to save a few megabytes. But all too often I see people storing their family's memories in JPG format. I have to assume they simply are unaware of how thoroughly the JPG format destroys all images it touches. And no, I am not over exaggerating there. To demonstrate the point I've whipped up this experiment in the hopes of enlightening just a few people out there.
To begin this experiment I created a new image in Photoshop. Nothing fancy, just very basic shapes and colors. This image was not concocted to produce any type of specific result, I just wanted some color variations, some hard and soft lines, and something not overly complex. Within a couple minutes I had this:
|
|
Then, from Photoshop 7, I preceded to save this image in a number a various formats. I used image formats such as TGA, PNG, BMP, and of course JPG. Regarding JPG, I saved the image at twelve different compression levels varying from "no" compression (quality at 100%) to maximum compression (quality at 0%).
I then examined each image, looking for any flaws or unwanted artifacts when compared to the original. What we'd like to see is an exact duplicate of the original. You certainly don't want something as benign as an image format to go making changes in your photograph or artwork…do you?
Upon casual inspection most images look just like the original (with the exception of the low quality JPGs, but this is to be expected). No surprise here. But upon close inspection, and I do mean close, at least one of the image formats begins to unveil it's flaws.
For this close inspection all I've done is zoom in on an otherwise very simple portion of the image. At this extreme zoom all we see are a couple fields of red in differing shades:
|
|
Then I took the "snapshot" of the zoomed area from each of our saved formats and ran them through various image filters. For anyone that is unfamiliar, an image filter is simply a process of changing the image to produce some type of visual effect. They can be as simple (and unperceivable) as a slight blur or as drastic (and obvious) as negative video edge detection. Often filters produce some kind of "artistic" version of the original. For example one of Photoshop's filters is Charcoal and Chalk which will make the image it processes appear to have been sketched by dark and light chalk.
But don't be fooled by the "artsy" feel these filters produce. Filters are generally just a mathematical algorithm that change each pixel of the image based on that pixel's neighboring pixels. What this means is most filters will always produce the same results given the same initial set of values. This is important to know for the rest of our experiment. (There are filters with intentional randomness in their algorithm but I've not used any of those filters here.)
We start off with showing that zoomed area, unaltered, from five differing formats compared to the original. I've used Truevision TARGA Format (TGA), Portable Network Graphics Format (PNG), Windows Bitmap Format (BMP), and JPEG File Interchange Format (JPG) at it's lowest and highest quality settings.
|
|
For starters let's ignore the low quality JPG. It's only here to give some relevance, we don't really expect it to perform at all in retaining image quality. The remaining four formats initially appear to perform well at reproducing the original (the word "appear" being the key to this statement). Note: The blue bar at the bottom of each image square is there to be a constant, so there is one area of each image that is identical for all the samples.
Let's see what happens when we start toying with filters. Here's the group with a basic "unsharpen mask" filter. This type filter (as most) simply detects differences between neighboring pixels and exaggerates that difference.
|
|
Well our uppermost three competitors are performing just fine. They are affected by the filter exactly in the same way the original is affected by the filter. But take a look at our "high quality" JPG. That's not what the original looks like. Hmmmm. Well, let's reset back to the original state of our samples and try some more filters. How about "Ink Outline":
|
|
Here's the aforementioned "Charcoal and Chalk":
|
|
...and "Half Tone":
|
|
"Reticulation": I just like this effect 8^)
|
|
And finally here's a custom filter:
|
|
I think this final filter really best demonstrates exactly what you are getting when you use the JPG format. Compared to the original, you are getting a sloppy, inexact representation of the original. Even at it's highest quality setting JPG cannot even come close to reproducing the original image.
But I'd like you to do more than notice how poorly the JPG performed. I'd like you to take notice how exceptionally well the other three formats fared. In fact they not only performed "well", they are exact pixel-per-pixel duplications of the original. They are "dead on" so to speak.
All this may lead one to ask, "Ok then, if JPG is so poor as you say then why is it in such widespread use?" Simple. The Web. JPG is not a useless format. It's greatest feature is it's ability to shrink a file's size. Therefore it's perfectly suited for most images that are intended for use on the World Wide Web. But even though this is JPG's strongest ability it's not always the best at performing this ability. To see this point proven let's now take a look at the relative file sizes of the images we've been working with in this experiment.
|
|
Obviously that "pixel-per-pixel" exactness comes at a high price for many formats. The TGA file size is almost double that of the original uncompressed image. That's crazy! And BMP isn't much better.
As expected the JPGs are both small files. But the zero quality JPG is so abhorred looking it's absolutely useless. Garbage. The high quality JPG is really not bad looking (when zoomed out) and would be very suitable for most purposes. But notice that there is even a better option. The PNG format image is even smaller than the "high quality" JPG. And the PNG image is not a supposed "high quality" representation of the original, it's a pixel-per-pixel exact duplication of the original.
So even you web people out there, that are working with JPGs constantly, you might be pleasantly surprised if you give the PNG format a chance once in a while. As a general rule of thumb the PNG format will make reasonable sized files when the image contains large portions of evenly colored spaces, much like it's sibling, the GIF format.
And for everyone else, I'd strongly urge you to not use JPG when saving any images that you place any value on, like prized digital photos, original artwork, scanned images of sketched artwork, etc. Instead choose an image format that will introduce NO ARTIFACTS into your valued image. And as always, for images that simply aren't vital to you, then using JPG is fine. Just remember, the damage done to an image by saving it to JPG format cannot be undone, so think twice before hitting that "save" button.
|
OuTpaTienT / Don Cowger / OIC
|
|