blob: 277332b2748c05125b192cb36156d43dce7d049a [file] [log] [blame]
(Most of the standard usage.doc file also applies to this alternate version,
but replace its "GENERAL USAGE" section with the text below. Edit the text
as necessary if you don't support wildcards or overwrite checking. Be sure
to fix the djpeg switch descriptions if you are not defaulting to PPM output.
Also, if you've provided an accurate memory-estimation procedure, you can
probably eliminate the HINTS related to the -maxmemory switch.)
GENERAL USAGE
We provide two programs, cjpeg to compress an image file into JPEG format,
and djpeg to decompress a JPEG file back into a conventional image format.
The basic command line is:
cjpeg [switches] list of image files
or
djpeg [switches] list of jpeg files
Each file named is compressed or decompressed. The input file(s) are not
modified; the output data is written to files which have the same names
except for extension. cjpeg always uses ".jpg" for the output file name's
extension; djpeg uses one of ".bmp", ".gif", ".ppm", ".rle", or ".tga",
depending on what output format is selected by the switches.
For example, to convert xxx.bmp to xxx.jpg and yyy.ppm to yyy.jpg, say:
cjpeg xxx.bmp yyy.ppm
On most systems you can use standard wildcards to specify the list of input
files; for example, on DOS "djpeg *.jpg" decompresses all the JPEG files in
the current directory.
If an intended output file already exists, you'll be asked whether or not to
overwrite it. If you say no, the program skips that input file and goes on
to the next one.
You can intermix switches and file names; for example
djpeg -gif file1.jpg -targa file2.jpg
decompresses file1.jpg into GIF format (file1.gif) and file2.jpg into Targa
format (file2.tga). Only switches to the left of a given file name affect
processing of that file; when there are conflicting switches, the rightmost
one takes precedence.
You can override the program's choice of output file name by using the
-outfile switch, as in
cjpeg -outfile output.jpg input.ppm
-outfile only affects the first input file name to its right.
The currently supported image file formats are: PPM (PBMPLUS color format),
PGM (PBMPLUS gray-scale format), BMP, GIF, Targa, and RLE (Utah Raster
Toolkit format). (RLE is supported only if the URT library is available,
which it isn't on most non-Unix systems.) cjpeg recognizes the input image
format automatically, with the exception of some Targa-format files. You
have to tell djpeg which format to generate.
JPEG files are in the defacto standard JFIF file format. There are other,
less widely used JPEG-based file formats, but we don't support them.
All switch names may be abbreviated; for example, -grayscale may be written
-gray or -gr. Most of the "basic" switches can be abbreviated to as little as
one letter. Upper and lower case are equivalent (-BMP is the same as -bmp).
British spellings are also accepted (e.g., -greyscale), though for brevity
these are not mentioned below.