Color subsampling in JPEGs - how?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bushmann

Color subsampling in JPEGs - how?

Post by Bushmann »

In IrfanView JPEG saving options dialogue, there is checkbox "disable color subsampling", and in Corel PhotoPaint, there is "jpeg sub-format" selector with "4:2:2" and "4:4:4" options.

If "disable subsampling" checked, or "4:4:4" selected, JPEGs with the same quality became little bigger, but some colors (especially reds) looks closer to original.

How can I reproduce same result with ImageMagick?
Is it correct to use -sampling-factor 4:4:4 ?
Which is default value, 4:2:2 ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Use a combination of -quality and -sampling-factor to increase quality of the JPEG image. Try
  • -quality 100 -sampling-factor 1:1:1
and work backwards from there until you reach a compromise between image fidelity and image compression size.
Post Reply