Linux Commands Examples

A great documentation place for Linux commands


display text comments from a JPEG file

see also : cjpeg - djpeg - jpegtran - wrjpgcom


rdjpgcom [ -raw ] [ -verbose ] [ filename ]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


rdjpgcom reads the named JPEG/JFIF file, or the standard input if no file is named, and prints any text comments found in the file on the standard output.

The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard doesn’t actually define what COM blocks are for, they are widely used to hold user-supplied text strings. This lets you add annotations, titles, index terms, etc to your JPEG files, and later retrieve them as text. COM blocks do not interfere with the image stored in the JPEG file. The maximum size of a COM block is 64K, but you can have as many of them as you like in one JPEG file.



Normally rdjpgcom escapes non-printable characters in comments, for security reasons. This option avoids that.

-verbose Causes rdjpgcom to also display the JPEG image dimensions.

Switch names may be abbreviated, and are not case sensitive.


rdjpgcom does not depend on the IJG JPEG library. Its source code is intended as an illustration of the minimum amount of code required to parse a JPEG file header correctly.

In -verbose mode, rdjpgcom will also attempt to print the contents of any "APP12" markers as text. Some digital cameras produce APP12 markers containing useful textual information. If you like, you can modify the source code to print other APPn marker types as well.

see also

cjpeg , djpeg , jpegtran , wrjpgcom


Independent JPEG Group

How can this site be more helpful to YOU ?

give  feedback