blob: d419a99993695c7f19091f270e6a197da36e73c9 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001.TH WRJPGCOM 1 "15 June 1995"
2.SH NAME
3wrjpgcom \- insert text comments into a JPEG file
4.SH SYNOPSIS
5.B wrjpgcom
6[
7.B \-replace
8]
9[
10.BI \-comment " text"
11]
12[
13.BI \-cfile " name"
14]
15[
16.I filename
17]
18.LP
19.SH DESCRIPTION
20.LP
21.B wrjpgcom
22reads the named JPEG/JFIF file, or the standard input if no file is named,
23and generates a new JPEG/JFIF file on standard output. A comment block is
24added to the file.
25.PP
26The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
27Although the standard doesn't actually define what COM blocks are for, they
28are widely used to hold user-supplied text strings. This lets you add
29annotations, titles, index terms, etc to your JPEG files, and later retrieve
30them as text. COM blocks do not interfere with the image stored in the JPEG
31file. The maximum size of a COM block is 64K, but you can have as many of
32them as you like in one JPEG file.
33.PP
34.B wrjpgcom
35adds a COM block, containing text you provide, to a JPEG file.
36Ordinarily, the COM block is added after any existing COM blocks; but you
37can delete the old COM blocks if you wish.
38.SH OPTIONS
39Switch names may be abbreviated, and are not case sensitive.
40.TP
41.B \-replace
42Delete any existing COM blocks from the file.
43.TP
44.BI \-comment " text"
45Supply text for new COM block on command line.
46.TP
47.BI \-cfile " name"
48Read text for new COM block from named file.
49.PP
50If you have only one line of comment text to add, you can provide it on the
51command line with
52.BR \-comment .
53The comment text must be surrounded with quotes so that it is treated as a
54single argument. Longer comments can be read from a text file.
55.PP
56If you give neither
57.B \-comment
58nor
59.BR \-cfile ,
60then
61.B wrjpgcom
62will read the comment text from standard input. (In this case an input image
63file name MUST be supplied, so that the source JPEG file comes from somewhere
64else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file
65indicator (usually control-D) to terminate the comment text entry.
66.PP
67.B wrjpgcom
68will not add a COM block if the provided comment string is empty. Therefore
69\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file.
70.SH EXAMPLES
71.LP
72Add a short comment to in.jpg, producing out.jpg:
73.IP
74.B wrjpgcom \-c
75\fI"View of my back yard" in.jpg
76.B >
77.I out.jpg
78.PP
79Attach a long comment previously stored in comment.txt:
80.IP
81.B wrjpgcom
82.I in.jpg
83.B <
84.I comment.txt
85.B >
86.I out.jpg
87.PP
88or equivalently
89.IP
90.B wrjpgcom
91.B -cfile
92.I comment.txt
93.B <
94.I in.jpg
95.B >
96.I out.jpg
97.SH SEE ALSO
98.BR cjpeg (1),
99.BR djpeg (1),
100.BR jpegtran (1),
101.BR rdjpgcom (1)
102.SH AUTHOR
103Independent JPEG Group