summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Brill <egore911@egore911.de>2009-01-10 15:01:54 +0100
committerChristoph Brill <egore911@egore911.de>2009-01-10 15:01:54 +0100
commit3b2ae036bf3a94a6cd6e9f3713dbc7b4d19bbc47 (patch)
tree6a66313dbd63a7080f602087561ecd2b1945faa5
parentf6c6778566ad43db6abc9731a92f649cac13aebb (diff)
parentfe277cb2f00ae872b828ba46ea25c1cca0d76ccc (diff)
Merge branch 'ubuntu-patches'
-rw-r--r--jpegtran.150
1 files changed, 43 insertions, 7 deletions
diff --git a/jpegtran.1 b/jpegtran.1
index 4e5b33c..4809a94 100644
--- a/jpegtran.1
+++ b/jpegtran.1
@@ -91,12 +91,12 @@ Transpose image (across UL-to-LR axis).
.TP
.B \-transverse
Transverse transpose (across UR-to-LL axis).
-.PP
+.IP
The transpose transformation has no restrictions regarding image dimensions.
The other transformations operate rather oddly if the image dimensions are not
a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
transform complete blocks of DCT coefficient data in the desired way.
-.PP
+.IP
.BR jpegtran 's
default behavior when transforming an odd-size image is designed
to preserve exact reversibility and mathematical consistency of the
@@ -108,7 +108,7 @@ able to flip all columns. The other transforms can be built up as sequences
of transpose and flip operations; for consistency, their actions on edge
pixels are defined to be the same as the end result of the corresponding
transpose-and-flip sequence.
-.PP
+.IP
For practical use, you may prefer to discard any untransformable edge pixels
rather than having a strange-looking strip along the right and/or bottom edges
of a transformed image. To do this, add the
@@ -117,7 +117,7 @@ switch:
.TP
.B \-trim
Drop non-transformable edge blocks.
-.PP
+.IP
Obviously, a transformation with
.B \-trim
is not reversible, so strictly speaking
@@ -130,6 +130,40 @@ trims only the bottom edge, but
followed by
.B \-rot 180 -trim
trims both edges.
+.IP
+If you are only interested by perfect transformation, add the
+.B \-perfect
+switch:
+.TP
+.B \-perfect
+Fails with an error if the transformation is not perfect. For example
+you may want to do
+.IP
+.B (jpegtran \-rot 90 -perfect foo.jpg || djpeg foo.jpg| pnmflip \-r90 | cjpeg)
+.IP
+to do a perfect rotation if available or an approximated one if
+not.
+.PP
+We also offer a lossless-crop option, which discards data outside a given
+image region but losslessly preserves what is inside. Like the rotate and
+flip transforms, lossless crop is restricted by the JPEG format: the upper
+left corner of the selected region must fall on an iMCU boundary. If this
+does not hold for the given crop parameters, we silently move the upper left
+corner up and/or left to make it so, simultaneously increasing the region
+dimensions to keep the lower right crop corner unchanged. (Thus, the
+output image covers at least the requested region, but may cover more.)
+.IP
+Note:
+.B \-perfect
+and
+.B lossless-crop
+are enhancements from http://sylvana.net/jpegcrop/ that may not be available on
+non-Debian systems.
+.PP
+The image can be losslessly cropped by giving the switch:
+.TP
+.B \-crop WxH+X+Y
+Crop to a rectangular subarea of width W, height H starting at point X,Y.
.PP
If you are only interested by perfect transformation, add the
.B \-perfect
@@ -169,7 +203,7 @@ Another not-strictly-lossless transformation switch is:
.TP
.B \-grayscale
Force grayscale output.
-.PP
+.IP
This option discards the chrominance channels if the input image is YCbCr
(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
luminance channel is preserved exactly, so this is a better method of reducing
@@ -193,9 +227,11 @@ but discards any other inessential data.
.TP
.B \-copy all
Copy all extra markers. This setting preserves miscellaneous markers
-found in the source file, such as JFIF thumbnails and Photoshop settings.
+found in the source file, such as
+Exif data,
+JFIF thumbnails and Photoshop settings.
In some files these extra markers can be sizable.
-.PP
+.IP
The default behavior is
.BR "\-copy comments" .
(Note: in IJG releases v6 and v6a,