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