JPEGNAIL(1)                                                        JPEGNAIL(1)



NAME
       jpegnail - Remove or embed thumbnails in Exif or JFIF JPEG images

SYNOPSIS
       jpegnail [options] file.jpg ...

DESCRIPTION
       This manual page documents briefly the jpegnail command.

       jpegnail  optimises  digital photographs in JPEG JFIF or Exif format in
       three ways.  It recompresses the image data in order to reduce the file
       size.   It  can  remove  embedded thumbnail images, thus shortening the
       files by a few kilobytes.  It can also embed grayscale or YCbCr  thumb-
       nail  images,  making  the  files  better viewable in programs that are
       aware of embedded JPEG thumbnail images.

OPTIONS
       jpegnail follows the usual  Unix  command  line  syntax,  with  options
       starting with a dash (`-').  Options and file names can be mixed on the
       command line.

       --     Stop processing options.  This is useful if a file  name  begins
              with a dash.

       -h     Display short usage information.

       -q quality
              Specify  the JPEG compression quality (quantization factor) as a
              number between 1 and 100.  The default is 75.

       -x width
              Specify the maximum width of the thumbnail image in pixels.  The
              default is zero.

       -y height
              Specify  the  maximum  height  of the thumbnail image in pixels.
              The default is zero.  If dimensions are zero  and  no  thumbnail
              directory  has been specified, thumbnails will be removed.  Oth-
              erwise, a thumbnail will be embedded by shrinking the  image  to
              the  specified  maximum width or height, or both, preserving the
              aspect ratio.

       -b     Generate baseline JPEG images.

       -p     Generate progressive JPEG images (default).  The files are typi-
              cally smaller, but some applications do not support the progres-
              sive format.  The thumbnails are always  generated  in  baseline
              format.

       -n     Do  not  compute  optimal  Huffman coding tables for the images.
              This will save some execution time and may produce larger files.
              For  thumbnail images, optimal coding tables will always be com-
              puted.

       -s directory
              Save the modified files in directory instead  of  replacing  the
              original files.

       -S directory
              Embed thumbnail image files from directory.

       -P command
              Output  progress indication to the standard input of an external
              command that is invoked by popen(3) as  a  child  process.   The
              progress  is  indicated  by a monotonically increasing stream of
              integer decimal numbers between 0 and 100.  A  possible  command
              could  be  "dialog --progress".  See also dialog(1), gdialog(1),
              and zenity(1).Thisoptionis not available on Windows.

EXAMPLES
       jpegnail *.jpg
              Remove thumbnails from all Exif and JFIF files *.jpg in the cur-
              rent directory, and convert the files to progressive format.

       jpegnail -s images -x 320 -y 200 a.jpg
              Read  the  Exif or JFIF file a.jpg, and write an optimised image
              images/a.jpg with an embedded thumbnail that is at most 320 pix-
              els wide and 200 pixels high.

       jpegnail - < in.jpg > out.jpg
              Optimise in.jpg to out.jpg via standard input and output.

BUGS
       When  using  the  -x  or  -y options, the input file must be a seekable
       stream, as it will be scanned twice.

       If the Exif record does not end in  IFD1  and  the  embedded  thumbnail
       data,  some of the Exif data may be corrupted.  Embedded thumbnails are
       best removed with exifiron(1), which refuses  to  manipulate  malformed
       Exif records.

AUTHOR
       Marko  Mkel  <marko.makela@iki.fi>.  The bitmap scaling algorithm has
       been adapted from pnmscale(1) by Jef Poskanzer, and the JPEG decompres-
       sion  and  compression  algorithms  are in libjpeg from the Independent
       JPEG Group.

SEE ALSO
       exifiron(1), jpegcom(1), jpegtran(1), photomolo(1).



                                 July 31, 2005                     JPEGNAIL(1)
