1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
--- jpegtran.1.orig Sun Aug 3 16:01:01 1997
+++ jpegtran.1 Fri Oct 8 14:51:56 2004
@@ -71,12 +71,23 @@
.PP
The image can be losslessly transformed by giving one of these switches:
.TP
+.B \-crop WxH+X+Y
+Crop to a rectangular subarea of width W, height H starting at point X,Y.
+Allows the Width and or Height of the image to exceed the image.
+.TP
+.B \-drop +X+Y
+Drop another image. Overlay part of the source image at point width
+W + height H.
+.TP
.B \-flip horizontal
Mirror image horizontally (left-right).
.TP
.B \-flip vertical
Mirror image vertically (top-bottom).
.TP
+.B \-perfect
+Fails with an error if there is any loss durring the transformation.
+.TP
.B \-rotate 90
Rotate image 90 degrees clockwise.
.TP
@@ -161,6 +172,14 @@
Copy all extra markers. This setting preserves miscellaneous markers
found in the source file, such as JFIF thumbnails and Photoshop settings.
In some files these extra markers can be sizable.
+See 'EXIF FILES' for special tratement of EXIF markers.
+.TP
+.B \-copy exif
+This setting preserves the EXIF marker, commonly found in JPEG files produced
+by digital cameras, in addition to any comment markers. If there is an EXIF
+marker it is copied and the JFIF marker (incompatible with EXIF) is
+omitted. If there is no EXIF marker a JFIF one is emitted as usual. See 'EXIF
+FILES' for special tratement of EXIF markers.
.PP
The default behavior is
.BR "\-copy comments" .
@@ -189,6 +208,26 @@
.B \-debug
Same as
.BR \-verbose .
+.SH EXIF FILES
+The EXIF variety of JPEG files, which are often produced by digital cameras,
+are recognized by jpegtran as EXIF files (i.e. not as JFIF, the
+usual variety of JPEG files). If the input file is recognized as EXIF (i.e.,
+there is an EXIF marker and no JFIF marker) the '-copy exif' option is
+automatically turned on if '-copy comments', or no '-copy' option, was
+specified. Thus, unless '-copy none' is specified an EXIF file is kept as EXIF
+and not converted to JFIF.
+.PP
+If a geometrical transformation is applied (e.g., rotate, transpose) the EXIF
+width and height fields are set to the width and height of the output
+image. Furthermore, the orientation field is reset to one, meaning tha the
+orientation of the output image is upright (i.e. normal).
+.PP
+Note that an explicitely given '-copy exif' option will output an EXIF file if
+the input is an EXIF file that was saved as JFIF, and that the EXIF marker is
+still present. This option is useful for recovering EXIF files that where
+converted to JFIF by a non EXIF-aware software. Note however, that the data in
+the EXIF marker is not validated, unless a geometrical transformation is
+applied.
.SH EXAMPLES
.LP
This example converts a baseline JPEG file to progressive form:
|