1WRJPGCOM(1) General Commands Manual WRJPGCOM(1)
2
3
4
6 wrjpgcom - insert text comments into a JPEG file
7
9 wrjpgcom [ -replace ] [ -comment text ] [ -cfile name ] [ filename ]
10
12 wrjpgcom reads the named JPEG/JFIF file, or the standard input if no
13 file is named, and generates a new JPEG/JFIF file on standard output.
14 A comment block is added to the file.
15
16 The JPEG standard allows "comment" (COM) blocks to occur within a JPEG
17 file. Although the standard doesn't actually define what COM blocks
18 are for, they are widely used to hold user-supplied text strings. This
19 lets you add annotations, titles, index terms, etc to your JPEG files,
20 and later retrieve them as text. COM blocks do not interfere with the
21 image stored in the JPEG file. The maximum size of a COM block is 64K,
22 but you can have as many of them as you like in one JPEG file.
23
24 wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
25 Ordinarily, the COM block is added after any existing COM blocks; but
26 you can delete the old COM blocks if you wish.
27
29 Switch names may be abbreviated, and are not case sensitive.
30
31 -replace
32 Delete any existing COM blocks from the file.
33
34 -comment text
35 Supply text for new COM block on command line.
36
37 -cfile name
38 Read text for new COM block from named file.
39
40 If you have only one line of comment text to add, you can provide it on
41 the command line with -comment. The comment text must be surrounded
42 with quotes so that it is treated as a single argument. Longer com‐
43 ments can be read from a text file.
44
45 If you give neither -comment nor -cfile, then wrjpgcom will read the
46 comment text from standard input. (In this case an input image file
47 name MUST be supplied, so that the source JPEG file comes from some‐
48 where else.) You can enter multiple lines, up to 64KB worth. Type an
49 end-of-file indicator (usually control-D) to terminate the comment text
50 entry.
51
52 wrjpgcom will not add a COM block if the provided comment string is
53 empty. Therefore -replace -comment "" can be used to delete all COM
54 blocks from a file.
55
57 Add a short comment to in.jpg, producing out.jpg:
58
59 wrjpgcom -c "View of my back yard" in.jpg > out.jpg
60
61 Attach a long comment previously stored in comment.txt:
62
63 wrjpgcom in.jpg < comment.txt > out.jpg
64
65 or equivalently
66
67 wrjpgcom -cfile comment.txt < in.jpg > out.jpg
68
70 cjpeg(1), djpeg(1), jpegtran(1), rdjpgcom(1)
71
73 Independent JPEG Group
74
75
76
77 15 June 1995 WRJPGCOM(1)