93
93
Transverse transpose (across UR-to-LL axis).
95
95
The transpose transformation has no restrictions regarding image dimensions.
96
96
The other transformations operate rather oddly if the image dimensions are not
97
97
a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
98
98
transform complete blocks of DCT coefficient data in the desired way.
101
101
default behavior when transforming an odd-size image is designed
102
102
to preserve exact reversibility and mathematical consistency of the
108
108
of transpose and flip operations; for consistency, their actions on edge
109
109
pixels are defined to be the same as the end result of the corresponding
110
110
transpose-and-flip sequence.
112
112
For practical use, you may prefer to discard any untransformable edge pixels
113
113
rather than having a strange-looking strip along the right and/or bottom edges
114
114
of a transformed image. To do this, add the
131
131
.B \-rot 180 -trim
132
132
trims both edges.
134
If you are only interested by perfect transformation, add the
139
Fails with an error if the transformation is not perfect. For example
142
.B (jpegtran \-rot 90 -perfect foo.jpg || djpeg foo.jpg| pnmflip \-r90 | cjpeg)
144
to do a perfect rotation if available or an approximated one if
147
We also offer a lossless-crop option, which discards data outside a given
148
image region but losslessly preserves what is inside. Like the rotate and
149
flip transforms, lossless crop is restricted by the JPEG format: the upper
150
left corner of the selected region must fall on an iMCU boundary. If this
151
does not hold for the given crop parameters, we silently move the upper left
152
corner up and/or left to make it so, simultaneously increasing the region
153
dimensions to keep the lower right crop corner unchanged. (Thus, the
154
output image covers at least the requested region, but may cover more.)
160
are enhancements from http://sylvana.net/jpegcrop/ that may not be available on
163
The image can be losslessly cropped by giving the switch:
166
Crop to a rectangular subarea of width W, height H starting at point X,Y.
168
134
Another not-strictly-lossless transformation switch is:
171
137
Force grayscale output.
173
139
This option discards the chrominance channels if the input image is YCbCr
174
140
(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
175
141
luminance channel is preserved exactly, so this is a better method of reducing
195
161
Copy all extra markers. This setting preserves miscellaneous markers
196
found in the source file, such as
198
JFIF thumbnails and Photoshop settings.
162
found in the source file, such as JFIF thumbnails and Photoshop settings.
199
163
In some files these extra markers can be sizable.
201
165
The default behavior is
202
166
.BR "\-copy comments" .
203
167
(Note: in IJG releases v6 and v6a,
268
232
The transform options can't transform odd-size images perfectly. Use
272
if you don't like the results.
234
if you don't like the results without it.
274
236
The entire image is read into memory and then written out again, even in
275
237
cases where this isn't really necessary. Expect swapping on large images,