- libjpeg-turbo note: This file is mostly taken from the libjpeg README
- file, and it is included only for reference. Some parts of it may not apply to
- libjpeg-turbo. Please see README-turbo.txt for information specific to the
- turbo version.
++libjpeg-turbo note: This file contains portions of the libjpeg v6b and v8
++README files, with additional wordsmithing by The libjpeg-turbo Project.
++It is included only for reference, as some parts of it may not apply to
++libjpeg-turbo. Please see README-turbo.txt for information specific to
++libjpeg-turbo.
+
+
The Independent JPEG Group's JPEG software
==========================================
- .TH CJPEG 1 "27 January 2012"
-.TH CJPEG 1 "28 August 2011"
++.TH CJPEG 1 "31 January 2012"
.SH NAME
cjpeg \- compress an image file to a JPEG file
.SH SYNOPSIS
.B \-baseline
if you need to ensure compatibility at low quality values.)
.PP
-The
-.B \-quality
-option has been extended in IJG version 7 for support of separate quality
-settings for luminance and chrominance (or in general, for every provided
-quantization table slot). This feature is useful for high-quality
-applications which cannot accept the damage of color data by coarse
-subsampling settings. You can now easily reduce the color data amount more
-smoothly with finer control without separate subsampling. The resulting file
-is fully compliant with standard JPEG decoders.
-Note that the
-.B \-quality
-ratings refer to the quantization table slots, and that the last value is
-replicated if there are more q-table slots than parameters. The default
-q-table slots are 0 for luminance and 1 for chrominance with default tables as
-given in the JPEG standard. This is compatible with the old behaviour in case
-that only one parameter is given, which is then used for both luminance and
-chrominance (slots 0 and 1). More or custom quantization tables can be set
-with
-.B \-qtables
-and assigned to components with
-.B \-qslots
-parameter (see the "wizard" switches below).
-.B Caution:
-You must explicitly add
-.BI \-sample " 1x1"
-for efficient separate color
-quality selection, since the default value used by library is 2x2!
+The \fB-quality\fR option has been extended in this version of \fBcjpeg\fR to
+support separate quality settings for luminance and chrominance (or, in
+general, separate settings for every quantization table slot.) The principle
+is the same as chrominance subsampling: since the human eye is more sensitive
+to spatial changes in brightness than spatial changes in color, the chrominance
+components can be quantized more than the luminance components without
+incurring any visible image quality loss. However, unlike subsampling, this
+feature reduces data in the frequency domain instead of the spatial domain,
+which allows for more fine-grained control. This option is useful in
+quality-sensitive applications, for which the artifacts generated by
+subsampling may be unacceptable.
+.PP
+The \fB-quality\fR option accepts a comma-separated list of parameters, which
- respectively refer to the quality levels which should be assigned to the
++respectively refer to the quality levels that should be assigned to the
+quantization table slots. If there are more q-table slots than parameters,
+then the last parameter is replicated. Thus, if only one quality parameter is
+given, this is used for both luminance and chrominance (slots 0 and 1,
+respectively), preserving the legacy behavior of cjpeg v6b and prior.
+More (or customized) quantization tables can be set with the \fB-qtables\fR
+option and assigned to components with the \fB-qslots\fR option (see the
+"wizard" switches below.)
+.PP
+JPEG files generated with separate luminance and chrominance quality are fully
+compliant with standard JPEG decoders.
+.PP
+.BR CAUTION:
+For this setting to be useful, be sure to pass an argument of \fB-sample 1x1\fR
+to \fBcjpeg\fR to disable chrominance subsampling. Otherwise, the default
+subsampling level (2x2, AKA "4:2:0") will be used.
.PP
The
.B \-progressive
- .TH JPEGTRAN 1 "11 October 2010"
-.TH JPEGTRAN 1 "28 December 2009"
++.TH JPEGTRAN 1 "31 January 2012"
.SH NAME
jpegtran \- lossless transformation of JPEG files
.SH SYNOPSIS
comments and other excess baggage present in the source file.
.TP
.B \-copy comments
-Copy only comment markers. This setting copies comments from the source file,
-but discards any other inessential (for image display) data.
+Copy only comment markers. This setting copies comments from the source file
- but discards any other data which is inessential for image display.
++but discards any other data that is inessential for image display.
.TP
.B \-copy all
Copy all extra markers. This setting preserves miscellaneous markers
slot 1 for chrominance.
int q_scale_factor[NUM_QUANT_TBLS]
- Linear quantization scaling factors (percentage, initialized 100)
+ [libjpeg v7+ API/ABI emulation only]
+ Linear quantization scaling factors (0-100, default 100)
for use with jpeg_default_qtables().
See rdswitch.c and cjpeg.c for an example of usage.
- Note that the q_scale_factor[] fields are the "linear" scales, so you
- have to convert from user-defined ratings via jpeg_quality_scaling().
- Here is an example code which corresponds to cjpeg -quality 90,70:
+ Note that the q_scale_factor[] values use "linear" scales, so JPEG
+ quality levels chosen by the user must be converted to these scales
- using jpeg_quality_scaling(). Here is an example which corresponds to
++ using jpeg_quality_scaling(). Here is an example that corresponds to
+ cjpeg -quality 90,70:
jpeg_set_defaults(cinfo);
other JPEG programs may be unable to decode the resulting file. Use -baseline
if you need to ensure compatibility at low quality values.)
-The -quality option has been extended in IJG version 7 for support of separate
-quality settings for luminance and chrominance (or in general, for every
-provided quantization table slot). This feature is useful for high-quality
-applications which cannot accept the damage of color data by coarse
-subsampling settings. You can now easily reduce the color data amount more
-smoothly with finer control without separate subsampling. The resulting file
-is fully compliant with standard JPEG decoders.
-Note that the -quality ratings refer to the quantization table slots, and that
-the last value is replicated if there are more q-table slots than parameters.
-The default q-table slots are 0 for luminance and 1 for chrominance with
-default tables as given in the JPEG standard. This is compatible with the old
-behaviour in case that only one parameter is given, which is then used for
-both luminance and chrominance (slots 0 and 1). More or custom quantization
-tables can be set with -qtables and assigned to components with -qslots
-parameter (see the "wizard" switches below).
-CAUTION: You must explicitly add -sample 1x1 for efficient separate color
-quality selection, since the default value used by library is 2x2!
+The -quality option has been extended in this version of cjpeg to support
+separate quality settings for luminance and chrominance (or, in general,
+separate settings for every quantization table slot.) The principle is the
+same as chrominance subsampling: since the human eye is more sensitive to
+spatial changes in brightness than spatial changes in color, the chrominance
+components can be quantized more than the luminance components without
+incurring any visible image quality loss. However, unlike subsampling, this
+feature reduces data in the frequency domain instead of the spatial domain,
+which allows for more fine-grained control. This option is useful in
+quality-sensitive applications, for which the artifacts generated by
+subsampling may be unacceptable.
+
+The -quality option accepts a comma-separated list of parameters, which
- respectively refer to the quality levels which should be assigned to the
++respectively refer to the quality levels that should be assigned to the
+quantization table slots. If there are more q-table slots than parameters,
+then the last parameter is replicated. Thus, if only one quality parameter is
+given, this is used for both luminance and chrominance (slots 0 and 1,
+respectively), preserving the legacy behavior of cjpeg v6b and prior. More (or
+customized) quantization tables can be set with the -qtables option and
+assigned to components with the -qslots option (see the "wizard" switches
+below.)
+
+JPEG files generated with separate luminance and chrominance quality are
+fully compliant with standard JPEG decoders.
+
+CAUTION: For this setting to be useful, be sure to pass an argument of
+-sample 1x1 to cjpeg to disable chrominance subsampling. Otherwise, the
+default subsampling level (2x2, AKA "4:2:0") will be used.
The -progressive switch creates a "progressive JPEG" file. In this type of
JPEG file, the data is stored in multiple scans of increasing quality. If the
Switches for advanced users:
- -block N Set DCT block size. All N from 1 to 16 are possible.
- Default is 8 (baseline format).
- Larger values produce higher compression,
- smaller values produce higher quality
- (exact DCT stage possible with 1 or 2; with the
- default quality of 75 and default Luminance qtable
- the DCT+Quantization stage is lossless for N=1).
- CAUTION: An implementation of the JPEG SmartScale
- extension is required for this feature. SmartScale
- enabled JPEG is not yet widely implemented, so many
- decoders will be unable to view a SmartScale extended
- JPEG file at all.
-
+ -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG
+ is not yet widely implemented, so many decoders will
+ be unable to view an arithmetic coded JPEG file at
+ all.
+
-dct int Use integer DCT method (default).
-dct fast Use fast integer DCT (less accurate).
-dct float Use floating-point DCT method.
suppresses all comments and other excess baggage
present in the source file.
-copy comments Copy only comment markers. This setting copies
- comments from the source file, but discards
- any other inessential (for image display) data.
+ comments from the source file but discards
- any other data which is inessential for image display.
++ any other data that is inessential for image display.
-copy all Copy all extra markers. This setting preserves
miscellaneous markers found in the source file, such
as JFIF thumbnails, Exif data, and Photoshop settings.