Bump to 2.0.6
[platform/upstream/libjpeg-turbo.git] / jpegtran.1
index 5b8e126..f330d14 100644 (file)
@@ -1,4 +1,4 @@
-.TH JPEGTRAN 1 "21 November 2014"
+.TH JPEGTRAN 1 "18 March 2017"
 .SH NAME
 jpegtran \- lossless transformation of JPEG files
 .SH SYNOPSIS
@@ -19,6 +19,10 @@ for example from baseline JPEG to progressive JPEG or vice versa.  It can also
 perform some rearrangements of the image data, for example turning an image
 from landscape to portrait format by rotation.
 .PP
+For EXIF files and JPEG files containing Exif data, you may prefer to use
+.B exiftran
+instead.
+.PP
 .B jpegtran
 works by rearranging the compressed data (DCT coefficients), without
 ever fully decoding the image.  Therefore, its transformations are lossless:
@@ -28,7 +32,11 @@ followed by
 .B cjpeg
 to accomplish the same conversion.  But by the same token,
 .B jpegtran
-cannot perform lossy operations such as changing the image quality.
+cannot perform lossy operations such as changing the image quality.  However,
+while the image data is losslessly transformed, metadata can be removed.  See
+the
+.B \-copy
+option for specifics.
 .PP
 .B jpegtran
 reads the named JPEG/JFIF file, or the standard input if no file is
@@ -150,6 +158,18 @@ For example, you may want to do
 .B | pnmflip \-r90 | cjpeg)
 .IP
 to do a perfect rotation, if available, or an approximated one if not.
+.PP
+This version of \fBjpegtran\fR also offers a lossless crop option, which
+discards data outside of a given image region but losslessly preserves what is
+inside.  Like the rotate and flip transforms, lossless crop is restricted by
+the current JPEG format; the upper left corner of the selected region must fall
+on an iMCU boundary.  If it doesn't, then it is silently moved up and/or left
+to the nearest iMCU boundary (the lower right corner is unchanged.)  Thus, the
+output image covers at least the requested region, but it may cover more.  The
+adjustment of the region dimensions may be optionally disabled by attaching an
+'f' character ("force") to the width or height number.
+
+The image can be losslessly cropped by giving the switch:
 .TP
 .B \-crop WxH+X+Y
 Crop the image to a rectangular region of width W and height H, starting at
@@ -180,28 +200,34 @@ such as comment blocks:
 .TP
 .B \-copy none
 Copy no extra markers from source file.  This setting suppresses all
-comments and other excess baggage present in the source file.
+comments and other metadata in the source file.
 .TP
 .B \-copy comments
 Copy only comment markers.  This setting copies comments from the source file
-but discards any other data that is inessential for image display.
+but discards any other metadata.
 .TP
 .B \-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.  In some files, these extra markers can be sizable.
+settings.  In some files, these extra markers can be sizable.  Note that this
+option will copy thumbnails as-is; they will not be transformed.
 .PP
 The default behavior is \fB-copy comments\fR.  (Note: in IJG releases v6 and
 v6a, \fBjpegtran\fR always did the equivalent of \fB-copy none\fR.)
 .PP
 Additional switches recognized by jpegtran are:
 .TP
+.BI \-icc " file"
+Embed ICC color management profile contained in the specified file.  Note that
+this will cause \fBjpegtran\fR to ignore any APP2 markers in the input file,
+even if \fB-copy all\fR is specified.
+.TP
 .BI \-maxmemory " N"
 Set limit for amount of memory to use in processing large images.  Value is
 in thousands of bytes, or millions of bytes if "M" is attached to the
 number.  For example,
 .B \-max 4m
-selects 4000000 bytes.  If more space is needed, temporary files will be used.
+selects 4000000 bytes.  If more space is needed, an error will occur.
 .TP
 .BI \-outfile " name"
 Send output image to the named file, not to standard output.