It wasn't me. You can't prove anything.


2005-06-28

Loss Image Compression
I have been asked for about the ten thousandth time why JPG format looks like crap after you make some changes. It is because JPG is a loss compression. Some of the information in the image is actually thrown away every time you save it. It is best to work in a non-loss compression like TIFF or GIF or the native format of your favorite editor until you get the image you are happy with. Then, store it in a format that is going to be around for a long time. JPG is not a good long term storage solution because it is owned by a company out to make money. Most photographers just leave things in Photo Shop format, but this will have problems when Adobe sells out to an Indian company in a couple of years. Some prefer to leave the raw format of the camera. These images are enormous. They are proprietary to each camera and sensor and may not be supported for ever either. If Micro-crap had their way, we would all just use Paint and like it.
Example
Raw Picture
JPG
after first compression
JPG
after second compression
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1
1
4
4
6
6
11
8
9
11
11
12
9
14
11
16
1
1
4
4
1
1
11
11
9
11
11
11
9
11
11
11
The chart above is over simplified. I hope it gets the idea across.
Missing Numbers First Time = 2, 3, 5, 7, 10, 13, 15
So, seven out of sixteen numbers are no longer there. That is nearly 50% compression. The difference may not be noticeable to the Human eye.
Missing Numbers Second Time = 2, 3, 5 ,6, 7, 8, 10, 12, 13, 14, 15, 16
So, twelve out of sixteen numbers are no longer there. That is 75 % compression. Trouble is, the difference may be noticeable and the image may appear more blocky.
To the human eye, the photo looks the same until there is a tremendous amount of loss. The places where JPG format does not work are gradual changes and fades. For example, the sky going from a sharp light gray blue near the horizon to a deep sea blue near straight up. At too high a compression rate you will get blocks of color in these areas. The programmers out in the world have worked on this dilemma and things have gotten better in the last several years. Honestly, I store most of my stuff in JPG format just because it comes off the camera that way and I do little editing. If I do editing, I convert the image to a lossless compression format first thing.

No comments: