Document -rgb option in djpeg man page; "gray-scale"="grayscale"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1294 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
2
README
2
README
@@ -62,7 +62,7 @@ OVERVIEW
|
||||
|
||||
This package contains C software to implement JPEG image encoding, decoding,
|
||||
and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
|
||||
method for full-color and gray-scale images. JPEG's strong suit is compressing
|
||||
method for full-color and grayscale images. JPEG's strong suit is compressing
|
||||
photographic images or other types of images that have smooth color and
|
||||
brightness transitions between neighboring pixels. Images with sharp lines or
|
||||
other abrupt features may not compress well with JPEG, and a higher JPEG
|
||||
|
||||
2
cjpeg.1
2
cjpeg.1
@@ -16,7 +16,7 @@ cjpeg \- compress an image file to a JPEG file
|
||||
compresses the named image file, or the standard input if no file is
|
||||
named, and produces a JPEG/JFIF file on the standard output.
|
||||
The currently supported input file formats are: PPM (PBMPLUS color
|
||||
format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
|
||||
format), PGM (PBMPLUS grayscale format), BMP, Targa, and RLE (Utah Raster
|
||||
Toolkit format). (RLE is supported only if the URT library is available.)
|
||||
.SH OPTIONS
|
||||
All switch names may be abbreviated; for example,
|
||||
|
||||
17
djpeg.1
17
djpeg.1
@@ -55,11 +55,14 @@ default options are chosen for highest quality output.) Currently, this is
|
||||
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
|
||||
.TP
|
||||
.B \-grayscale
|
||||
Force gray-scale output even if JPEG file is color. Useful for viewing on
|
||||
Force grayscale output even if JPEG file is color. Useful for viewing on
|
||||
monochrome displays; also,
|
||||
.B djpeg
|
||||
runs noticeably faster in this mode.
|
||||
.TP
|
||||
.B \-rgb
|
||||
Force RGB output even if JPEG file is grayscale.
|
||||
.TP
|
||||
.BI \-scale " M/N"
|
||||
Scale the output image by a factor M/N. Currently the scale factor must be
|
||||
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
|
||||
@@ -74,7 +77,7 @@ emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-gif
|
||||
@@ -88,12 +91,12 @@ emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-pnm
|
||||
Select PBMPLUS (PPM/PGM) output format (this is the default format).
|
||||
PGM is emitted if the JPEG file is gray-scale or if
|
||||
PGM is emitted if the JPEG file is grayscale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise PPM is emitted.
|
||||
.TP
|
||||
@@ -101,8 +104,8 @@ is specified; otherwise PPM is emitted.
|
||||
Select RLE output format. (Requires URT library.)
|
||||
.TP
|
||||
.B \-targa
|
||||
Select Targa output format. Gray-scale format is emitted if the JPEG file is
|
||||
gray-scale or if
|
||||
Select Targa output format. Grayscale format is emitted if the JPEG file is
|
||||
grayscale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise, colormapped format is emitted if
|
||||
.B \-colors
|
||||
@@ -174,7 +177,7 @@ faster and needs less memory, but it produces a lower-quality image.
|
||||
is ignored unless you also say
|
||||
.B \-colors
|
||||
.IR N .
|
||||
Also, the one-pass method is always used for gray-scale output (the two-pass
|
||||
Also, the one-pass method is always used for grayscale output (the two-pass
|
||||
method is no improvement then).
|
||||
.TP
|
||||
.BI \-maxmemory " N"
|
||||
|
||||
18
usage.txt
18
usage.txt
@@ -17,7 +17,7 @@ INTRODUCTION
|
||||
|
||||
These programs implement JPEG image encoding, decoding, and transcoding.
|
||||
JPEG (pronounced "jay-peg") is a standardized compression method for
|
||||
full-color and gray-scale images.
|
||||
full-color and grayscale images.
|
||||
|
||||
|
||||
GENERAL USAGE
|
||||
@@ -50,7 +50,7 @@ or
|
||||
This syntax works on all systems, so it is useful for scripts.
|
||||
|
||||
The currently supported image file formats are: PPM (PBMPLUS color format),
|
||||
PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit
|
||||
PGM (PBMPLUS grayscale format), BMP, Targa, and RLE (Utah Raster Toolkit
|
||||
format). (RLE is supported only if the URT library is available.)
|
||||
cjpeg recognizes the input image format automatically, with the exception
|
||||
of some Targa-format files. You have to tell djpeg which format to generate.
|
||||
@@ -271,7 +271,7 @@ The basic command line switches for djpeg are:
|
||||
highest quality output.) Currently, this is equivalent
|
||||
to "-dct fast -nosmooth -onepass -dither ordered".
|
||||
|
||||
-grayscale Force gray-scale output even if JPEG file is color.
|
||||
-grayscale Force grayscale output even if JPEG file is color.
|
||||
Useful for viewing on monochrome displays; also,
|
||||
djpeg runs noticeably faster in this mode.
|
||||
|
||||
@@ -284,7 +284,7 @@ The basic command line switches for djpeg are:
|
||||
|
||||
-bmp Select BMP output format (Windows flavor). 8-bit
|
||||
colormapped format is emitted if -colors or -grayscale
|
||||
is specified, or if the JPEG file is gray-scale;
|
||||
is specified, or if the JPEG file is grayscale;
|
||||
otherwise, 24-bit full-color format is emitted.
|
||||
|
||||
-gif Select GIF output format. Since GIF does not support
|
||||
@@ -294,18 +294,18 @@ The basic command line switches for djpeg are:
|
||||
|
||||
-os2 Select BMP output format (OS/2 1.x flavor). 8-bit
|
||||
colormapped format is emitted if -colors or -grayscale
|
||||
is specified, or if the JPEG file is gray-scale;
|
||||
is specified, or if the JPEG file is grayscale;
|
||||
otherwise, 24-bit full-color format is emitted.
|
||||
|
||||
-pnm Select PBMPLUS (PPM/PGM) output format (this is the
|
||||
default format). PGM is emitted if the JPEG file is
|
||||
gray-scale or if -grayscale is specified; otherwise
|
||||
grayscale or if -grayscale is specified; otherwise
|
||||
PPM is emitted.
|
||||
|
||||
-rle Select RLE output format. (Requires URT library.)
|
||||
|
||||
-targa Select Targa output format. Gray-scale format is
|
||||
emitted if the JPEG file is gray-scale or if
|
||||
-targa Select Targa output format. Grayscale format is
|
||||
emitted if the JPEG file is grayscale or if
|
||||
-grayscale is specified; otherwise, colormapped format
|
||||
is emitted if -colors is specified; otherwise, 24-bit
|
||||
full-color format is emitted.
|
||||
@@ -367,7 +367,7 @@ Switches for advanced users:
|
||||
The one-pass method is faster and needs less memory,
|
||||
but it produces a lower-quality image. -onepass is
|
||||
ignored unless you also say -colors N. Also,
|
||||
the one-pass method is always used for gray-scale
|
||||
the one-pass method is always used for grayscale
|
||||
output (the two-pass method is no improvement then).
|
||||
|
||||
-maxmemory N Set limit for amount of memory to use in processing
|
||||
|
||||
4
wrgif.c
4
wrgif.c
@@ -218,7 +218,7 @@ put_3bytes (gif_dest_ptr dinfo, int val)
|
||||
LOCAL(void)
|
||||
emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
|
||||
/* Output the GIF file header, including color map */
|
||||
/* If colormap==NULL, synthesize a gray-scale colormap */
|
||||
/* If colormap==NULL, synthesize a grayscale colormap */
|
||||
{
|
||||
int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte;
|
||||
int cshift = dinfo->cinfo->data_precision - 8;
|
||||
@@ -270,7 +270,7 @@ emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
|
||||
put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift);
|
||||
}
|
||||
} else {
|
||||
/* Create a gray-scale map of num_colors values, range 0..255 */
|
||||
/* Create a grayscale map of num_colors values, range 0..255 */
|
||||
put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -73,7 +73,7 @@ write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors)
|
||||
targaheader[17] = 0x20; /* Top-down, non-interlaced */
|
||||
|
||||
if (cinfo->out_color_space == JCS_GRAYSCALE) {
|
||||
targaheader[2] = 3; /* image type = uncompressed gray-scale */
|
||||
targaheader[2] = 3; /* image type = uncompressed grayscale */
|
||||
targaheader[16] = 8; /* bits per pixel */
|
||||
} else { /* must be RGB */
|
||||
if (num_colors > 0) {
|
||||
|
||||
Reference in New Issue
Block a user