Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

JPEG image compression FAQ, part 1/2
Section - [5] What are good "quality" settings for JPEG?

( Part1 - Part2 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Zip codes ]


Top Document: JPEG image compression FAQ, part 1/2
Previous Document: [4] How well does JPEG compress images?
Next Document: [6] Where can I get JPEG software?
See reader questions & answers on this topic! - Help others by sharing your knowledge
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.
The quality settings discussed in this article apply to the free IJG JPEG
software (see part 2, item 15), and to many programs based on it.  Some
other JPEG implementations use completely different quality scales.
For example:
  * Apple used to use a scale running from 0 to 4, not 0 to 100.
  * Recent Apple software uses an 0-100 scale that has nothing to do with
    the IJG scale (their Q 50 is about the same as Q 80 on the IJG scale).
  * Paint Shop Pro's scale is the exact opposite of the IJG scale, PSP
    setting N = IJG 100-N; thus lower numbers are higher quality in PSP.
  * Adobe Photoshop doesn't use a numeric scale at all, it just gives you
    "high"/"medium"/"low" choices.  (But I hear this is changing in 4.0.)
Fortunately, this confusion doesn't prevent different implementations from
exchanging JPEG files.  But you do need to keep in mind that quality scales
vary considerably from one JPEG-creating program to another, and that just
saying "I saved this at Q 75" doesn't mean a thing if you don't say which
program you used.

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
(see "[9] What are some rules of thumb for converting GIF images to JPEG?").

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.

If you want a very small file (say for preview or indexing purposes) and are
prepared to tolerate large defects, a Q setting in the range of 5 to 10 is
about right.  Q 2 or so may be amusing as "op art".  (It's worth mentioning
that the current IJG software is not optimized for such low quality factors.
Future versions may achieve better image quality for the same file size at
low quality settings.)

If your image contains sharp colored edges, you may notice slight fuzziness
or jagginess around such edges no matter how high you make the quality
setting.  This can be suppressed, at a price in file size, by turning off
chroma downsampling in the compressor.  The IJG encoder regards downsampling
as a separate option which you can turn on or off independently of the Q
setting.  With the "cjpeg" program, the command line switch "-sample 1x1"
turns off downsampling; other programs based on the IJG library may have
checkboxes or other controls for downsampling.  Other JPEG implementations
may or may not provide user control of downsampling.  Adobe Photoshop, for
example, automatically switches off downsampling at its higher quality
settings.  On most photographic images, we recommend leaving downsampling
on, because it saves a significant amount of space at little or no visual
penalty.

For images being used on the World Wide Web, it's often a good idea to
give up a small amount of image quality in order to reduce download time.
Quality settings around 50 are often perfectly acceptable on the Web.
In fact, a user viewing such an image on a browser with a 256-color display
is unlikely to be able to see any difference from a higher quality setting,
because the browser's color quantization artifacts will swamp any
imperfections in the JPEG image itself.  It's also worth knowing that
current progressive-JPEG-making programs use default progression sequences
that are tuned for quality settings around 50-75: much below 50, the early
scans will look really bad, while much above 75, the later scans won't
contribute anything noticeable to the picture.

User Contributions:

aralen for sale https://chloroquineorigin.com/ - aralen where to buy malarone buy chloroquine uk https://chloroquineorigin.com/
2
May 6, 2022 @ 9:21 pm
hydroxychloroquine classification https://keys-chloroquinehydro.com/

Comment about this article, ask questions, or add new information about this topic:




Top Document: JPEG image compression FAQ, part 1/2
Previous Document: [4] How well does JPEG compress images?
Next Document: [6] Where can I get JPEG software?

Part1 - Part2 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
jpeg-info@uunet.uu.net





Last Update March 27 2014 @ 02:11 PM