10139N/A<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
10139N/A<!--ArborText, Inc., 1988-1999, v.4002-->
15992N/A<!--ARC : LSARC 2005/734 GNOME For Nevada-->
15992N/A<!--ARC : LSARC 2003/085 libtiff, libjpeg, and libpng-->
10139N/A<!ENTITY exam-tt "EXAMPLES">
10139N/A<!ENTITY cmd "wrjpgcom">
10139N/A<!ENTITY % commonents SYSTEM "smancommon.ent">
10139N/A%commonents;
10139N/A<!ENTITY % booktitles SYSTEM "booktitles.ent">
10139N/A%booktitles;
10139N/A<!ENTITY suncopy "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.">
10139N/A]>
10139N/A<?Pub UDT _bookmark _target>
10139N/A<?Pub Inc>
10139N/A<refentry id="wrjpgcom-1">
10139N/A<!-- %Z%%M% %I% %E% SMI; -->
10139N/A<refmeta><refentrytitle>wrjpgcom</refentrytitle><manvolnum>1</manvolnum>
10139N/A<refmiscinfo class="date">26 Mar 2004</refmiscinfo>
10139N/A<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
10139N/A<refmiscinfo class="software">&release;</refmiscinfo>
10139N/A<refmiscinfo class="arch">generic</refmiscinfo>
10139N/A<refmiscinfo class="copyright">&suncopy;</refmiscinfo>
10139N/A</refmeta>
10139N/A<indexterm><primary>wrjpgcom</primary></indexterm><indexterm><primary>insert
10139N/Atext comments into a JPEG file</primary></indexterm>
10139N/A<refnamediv id="wrjpgcom-1-name"><refname>wrjpgcom</refname><refpurpose>insert
10139N/Atext comments into a JPEG file</refpurpose></refnamediv>
10139N/A<refsynopsisdiv id="wrjpgcom-1-synp"><title>&synp-tt;</title>
10139N/A<cmdsynopsis><command>&cmd;</command><arg choice="opt"><option>replace</option></arg>
10139N/A<arg choice="opt"><option>comment <replaceable>text</replaceable></option></arg>
10139N/A<arg choice="opt"><option>cfile <replaceable>name</replaceable></option></arg>
10139N/A<arg choice="opt"><option role="nodash"><replaceable>filename</replaceable></option></arg>
10139N/A</cmdsynopsis></refsynopsisdiv>
10139N/A<refsect1 id="wrjpgcom-1-desc"><title>&desc-tt;</title>
10139N/A<para><command>&cmd;</command> reads the named JPEG or JFIF file, or the standard
10139N/Ainput if no file is named, and generates a new JPEG or JFIF file on the standard
10139N/Aoutput. A comment block is added to the file.</para>
10139N/A<para>The JPEG standard allows "comment" (COM) blocks to occur within a JPEG
10139N/Afile. Although the standard does not actually define the intended function
10139N/Aof COM blocks, they are widely used to hold user-supplied text strings. This
10139N/Aenables you to add annotations, titles, index terms, and so on to your JPEG
10139N/Afiles, and later retrieve the COM blocks as text. COM blocks do not interfere
10139N/Awith the image stored in the JPEG file. The maximum size of a COM block is
10139N/A64K, but you can have many COM blocks in one JPEG file.</para>
10139N/A<para><command>&cmd;</command> adds a COM block, containing text that you
10139N/Aprovide, to a JPEG file. Ordinarily, the COM block is added after any existing
10139N/ACOM blocks, but you can delete the old COM blocks if you wish.</para>
10139N/A</refsect1>
10139N/A<refsect1 id="wrjpgcom-1-opts"><title>&opts-tt;</title>
10139N/A<para>The following options are supported:</para>
10139N/A<variablelist termlength="narrow">
10139N/A<varlistentry><term><option>cfile <replaceable>name</replaceable></option></term>
10139N/A<listitem><para>Read the text for a new COM block from the named file.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>comment <replaceable>text</replaceable></option></term>
10139N/A<listitem><para>Supply the text for a new COM block on the command line.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>replace</option></term><listitem><para>Delete
10139N/Aany existing COM blocks from the file.</para>
10139N/A</listitem></varlistentry>
10139N/A</variablelist></refsect1>
10139N/A<refsect1 id="wrjpgcom-1-oper"><title>&oper-tt;</title>
10139N/A<para>The following operands are supported:</para>
10139N/A<variablelist termlength="narrow">
10139N/A<varlistentry><term><option role="nodash"><replaceable>filename</replaceable></option></term>
10139N/A<listitem><para>The name of the JPEG file to which you want to add text comments.
10139N/A</para>
10139N/A</listitem></varlistentry>
10139N/A</variablelist></refsect1>
10139N/A<refsect1 id="wrjpgcom-1-exde"><title>&exde-tt;</title>
10139N/A<para>To add only one line of comment text, use the <option>comment</option>
10139N/Aoption to provide the text on the command line. Specify the comment text within
10139N/Aquotes, so that the text is treated as a single argument. Longer comments
10139N/Acan be read from a text file.</para>
10139N/A<para>If you specify neither the <option>comment</option> nor the <option>
10139N/Acfile</option> option, <command>&cmd;</command> reads the comment text from
10139N/Astandard input. In such cases, you must supply an input image filename. You
10139N/Acan enter multiple lines, up to 64KB. Type an end-of-file indicator, usually
10139N/ACtrl-D, to terminate the comment text entry.</para>
10139N/A<para><command>&cmd;</command> does not add a COM block if the provided comment
10139N/Astring is empty. Therefore, you can use <option>replace</option> <option>
10139N/Acomment ""</option> to delete all COM blocks from a file.</para>
10139N/A</refsect1>
10139N/A<refsect1 id="wrjpgcom-1-exam"><title>&exam-tt;</title>
10139N/A<example role="example">
10139N/A<title>Adding a Short Comment to in.jpg to Produce out.jpg</title>
10139N/A<para><screen>example% <userinput>&cmd; -c "View of my back yard" in.jpg > out.jpg
10139N/A</userinput></screen></para>
10139N/A</example>
10139N/A<example role="example">
10139N/A<title>Attaching a Long Comment Previously Stored in comment.txt</title>
10139N/A<para><screen>example% <userinput>&cmd; in.jpg &lt; comment.txt > out.jpg
10139N/A</userinput></screen></para>
10139N/A<para>or</para>
11904N/A<para><screen>example% <userinput>&cmd; -cfile comment.txt &lt; in.jpg > out.jpg
10139N/A</userinput></screen></para>
10139N/A<para>In this example, 1000 is a number that is larger than the number of
10139N/Arows in the source file.</para>
10139N/A</example>
10139N/A</refsect1>
10139N/A<refsect1 id="wrjpgcom-1-attr"><title>&attr-tt;</title>
10139N/A<para>See <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry>
10139N/A<refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>
10139N/Afor descriptions of the following attributes:</para>
10139N/A<informaltable frame="all">
10139N/A<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="COLSPEC0" colwidth="1*">
10139N/A<colspec colname="COLSPEC1" colwidth="1*">
10139N/A<thead>
10139N/A<row><entry align="center" valign="middle">ATTRIBUTE TYPE</entry><entry align="center"
10139N/Avalign="middle">ATTRIBUTE VALUE</entry></row>
10139N/A</thead>
10139N/A<tbody>
18745N/A<row><entry><para>Availability</para></entry><entry><para>image/library/libjpeg</para></entry>
10139N/A</row>
10139N/A<row><entry colname="COLSPEC0"><para>Interface stability</para></entry><entry
10139N/Acolname="COLSPEC1"><para>Volatile</para></entry></row>
10139N/A</tbody>
10139N/A</tgroup>
10139N/A</informaltable>
10139N/A</refsect1>
10139N/A<refsect1 id="wrjpgcom-1-also"><title>&also-tt;</title>
10139N/A<!--Reference to another man page-->
10139N/A<!--Reference to a Help manual-->
10139N/A<!--Reference to a book.-->
10139N/A<para><citerefentry><refentrytitle>cjpeg</refentrytitle><manvolnum>1</manvolnum>
10139N/A</citerefentry>, <citerefentry><refentrytitle>djpeg</refentrytitle><manvolnum>
10139N/A1</manvolnum></citerefentry>, <citerefentry><refentrytitle>jpegtran</refentrytitle>
10139N/A<manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>rdjpgcom
10139N/A</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
10139N/A</refsect1>
10139N/A<refsect1 id="wrjpgcom-1-note"><title>&note-tt;</title>
10139N/A<para>This man page was originally written by the Independent JPEG Group.
10139N/AUpdated by Breda McColgan, Sun Microsystems Inc., 2004. </para>
10139N/A</refsect1>
10139N/A</refentry>