View Single Post
Old July 13th, 2010, 08:43 PM   #10
tuffy
Veteran Member
 
Join Date: Aug 2007
Posts: 566
Thanks: 192
Thanked 12,244 Times in 432 Posts
tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+tuffy 50000+
Default

Quote:
Originally Posted by Dekoda View Post
Photoshop does a poor job when it comes to jpeg sizes. They have a 1 to 12 scale, while most other programs have a 1 to 100 scale. If you use PS to save an image in jpeg format, a 9 is the best number to use. Anything over that will just make a bigger filesize, but won't result in a better image. If you save the image with a setting of 12, then compare it to a setting of 9....there will be no visible difference.

There is a reason for this. The better way to save a jpeg is with a program that uses the 1 to 100 jpeg settings. With a program like that, I use a setting of 85. This is called the "Q" or quality. This is derived from the five factors of an image.....the red, blue, green, chrominance, and luminance of the picture. When you save a jpeg, you are compressing the image. That means that you are throwing away some of the information in the picture.

You can eliminate the chrominance and the luminance, since they are a product of the brightness of the colors in the picture. The chrominance and luminance make up 20% of the picture, so if you eliminate that, you are left with 80% of the information in the picture. To play it safe, I add an extra 5% of the information, making it 85% or a quality of 85. Anything over that will not be visible in the picture. Saving it at a 12 in Photoshop will not yield any benefits over saving it as a 9.


All input is welcome.
About JPEG

(Source the JPEG FAQ).

JPEG is "lossy," meaning that the decompressed image isn't quite the same as the one you started with.

JPEG is designed to exploit known limitations of the human eye, notably the fact that small color changes are
perceived less accurately than small changes in brightness.

----------------------------------------------------

JPEG defines a "baseline" lossy algorithm, here's the outline of the baseline compression algorithm:

1. Transform the image into a suitable color space. This is a no-op for
grayscale, but for color images you generally want to transform RGB into a
luminance/chrominance color space (YCbCr, YUV, etc). The luminance component
is grayscale and the other two axes are color information. The reason for
doing this is that you can afford to lose a lot more information in the
chrominance components than you can in the luminance component: the human eye
is not as sensitive to high-frequency chroma info as it is to high-frequency
luminance.

2. (Optional) Downsample each component by averaging together groups of
pixels. The luminance component is left at full resolution, while the chroma
components are often reduced 2:1 horizontally and either 2:1 or 1:1 (no change) vertically.
This step immediately reduces the data volume by one-half or one-third.
In numerical terms it is highly lossy, but for most images it has almost no
impact on perceived quality, because of the eye's poorer resolution for chroma info.

3. Group the pixel values for each component into 8x8 blocks. Transform each
8x8 block through a discrete cosine transform (DCT).
Thus you now have numbers representing the average value in each block and
successively higher-frequency changes within the block. The motivation for
doing this is that you can now throw away high-frequency information without
affecting low-frequency information.

4. In each block, divide each of the 64 frequency components by a separate
"quantization coefficient", and round the results to integers. This is the
fundamental information-losing step. The larger the quantization
coefficients, the more data is discarded.

5. Encode the reduced coefficients using either Huffman or arithmetic coding.
Notice that this step is lossless, so it doesn't affect image quality.

6. Tack on appropriate headers, etc, and output the result. In a normal
"interchange" JPEG file, all of the compression parameters are included
in the headers so that the decompressor can reverse the process. These
parameters include the quantization tables and the Huffman coding tables.

The decompression algorithm reverses this process.

-----------------------------------------------------

Most JPEG compressors let you pick a file size vs. image quality tradeoff by
selecting a quality setting. There seems to be widespread confusion about
the meaning of these settings. "Quality 95" does NOT mean "keep 95% of the
information", as some have claimed. The quality scale is purely arbitrary;
it's not a percentage of anything.

In fact, quality scales aren't even standardized across JPEG programs.
Adobe Photoshop doesn't use a numeric scale at all, it just gives you
Low/Medium/High/Maximum choices.

In most cases the user's goal is to pick the lowest quality setting, or
smallest file size, that decompresses into an image indistinguishable from
the original. This setting will vary from one image to another and from one
observer to another, but here are some rules of thumb.

For good-quality, full-color source images, the default IJG quality setting
(Q 75) is very often the best choice. This setting is about the lowest you
can go without expecting to see defects in a typical image. Try Q 75 first;
if you see defects, then go up.

If the image was less than perfect quality to begin with, you might be able
to drop down to Q 50 without objectionable degradation. On the other hand,
you might need to go to a *higher* quality setting to avoid further loss.
This is often necessary if the image contains dithering or moire patterns.

Except for experimental purposes, never go above about Q 95; using Q 100
will produce a file two or three times as large as Q 95, but of hardly any
better quality. Q 100 is a mathematical limit rather than a useful setting.
If you see a file made with Q 100, it's a pretty sure sign that the maker
didn't know what he/she was doing.

Adobe Photoshop automatically switches off chroma downsampling at its higher quality
settings, that's why the bigger file size.

================================================== =====

JPEG Test with Photoshop 4

Photoshop Jpeg Options

Quality:

00 Q62 Low - small file
01 Q66
02 Q70
03 Q75 Medium
04 Q77
05 Q81
06 Q84 High
07 Q88
08 Q92 Maximum - large file
09 Q95
10 Q98

Quality vs File size:

Sample: 1266x1788, JPEG size 150K, size when opened 6.48M

00 Q62 92k Low - small file
01 Q66 107k
02 Q70 122k
03 Q75 142k Medium
04 Q77 179k
05 Q81 199k
06 Q84 258k High
07 Q88 338k
08 Q92 505k Maximum - large file
09 Q95 863k
10 Q98 1750k

Comments:

1. Photoshop 4 uses a Quality scale between 0-10 (not 12)

2. I've got the Q values from the saved files via Jpeg Group's jpeg test program

3. The recommended Q75 value is at 03 (Medium)

4. Dekoda's recommended Q85 value is at 06-07 (High)

5. Those people who post files saved with Q100 "don't know what they are doing"


Tuffy
tuffy is offline   Reply With Quote
The Following 11 Users Say Thank You to tuffy For This Useful Post: