aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:24:39 +1000
committerDavid Walter Seikel2013-01-13 17:24:39 +1000
commit393b5cd1dc438872af89d334ef6e5fcc59f27d47 (patch)
tree6a14521219942a08a1b95cb2f5a923a9edd60f63 /libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1
parentAdd a note about rasters suggested start up code. (diff)
downloadSledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.zip
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.gz
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.bz2
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.xz
Added Irrlicht 1.8, but without all the Windows binaries.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1348
1 files changed, 348 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1 b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1
new file mode 100644
index 0000000..18283e5
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/cjpeg.1
@@ -0,0 +1,348 @@
1.TH CJPEG 1 "28 August 2011"
2.SH NAME
3cjpeg \- compress an image file to a JPEG file
4.SH SYNOPSIS
5.B cjpeg
6[
7.I options
8]
9[
10.I filename
11]
12.LP
13.SH DESCRIPTION
14.LP
15.B cjpeg
16compresses the named image file, or the standard input if no file is
17named, and produces a JPEG/JFIF file on the standard output.
18The currently supported input file formats are: PPM (PBMPLUS color
19format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
20Toolkit format). (RLE is supported only if the URT library is available.)
21.SH OPTIONS
22All switch names may be abbreviated; for example,
23.B \-grayscale
24may be written
25.B \-gray
26or
27.BR \-gr .
28Most of the "basic" switches can be abbreviated to as little as one letter.
29Upper and lower case are equivalent (thus
30.B \-BMP
31is the same as
32.BR \-bmp ).
33British spellings are also accepted (e.g.,
34.BR \-greyscale ),
35though for brevity these are not mentioned below.
36.PP
37The basic switches are:
38.TP
39.BI \-quality " N[,...]"
40Scale quantization tables to adjust image quality. Quality is 0 (worst) to
41100 (best); default is 75. (See below for more info.)
42.TP
43.B \-grayscale
44Create monochrome JPEG file from color input. Be sure to use this switch when
45compressing a grayscale BMP file, because
46.B cjpeg
47isn't bright enough to notice whether a BMP file uses only shades of gray.
48By saying
49.BR \-grayscale ,
50you'll get a smaller JPEG file that takes less time to process.
51.TP
52.B \-rgb
53Create RGB JPEG file.
54Using this switch suppresses the conversion from RGB
55colorspace input to the default YCbCr JPEG colorspace.
56Use this switch in combination with the
57.BI \-block " N"
58switch (see below) for lossless JPEG coding.
59.TP
60.B \-optimize
61Perform optimization of entropy encoding parameters. Without this, default
62encoding parameters are used.
63.B \-optimize
64usually makes the JPEG file a little smaller, but
65.B cjpeg
66runs somewhat slower and needs much more memory. Image quality and speed of
67decompression are unaffected by
68.BR \-optimize .
69.TP
70.B \-progressive
71Create progressive JPEG file (see below).
72.TP
73.BI \-scale " M/N"
74Scale the output image by a factor M/N. Currently supported scale factors are
75M/N with all N from 1 to 16, where M is the destination DCT size, which is 8
76by default (see
77.BI \-block " N"
78switch below).
79.TP
80.B \-targa
81Input file is Targa format. Targa files that contain an "identification"
82field will not be automatically recognized by
83.BR cjpeg ;
84for such files you must specify
85.B \-targa
86to make
87.B cjpeg
88treat the input as Targa format.
89For most Targa files, you won't need this switch.
90.PP
91The
92.B \-quality
93switch lets you trade off compressed file size against quality of the
94reconstructed image: the higher the quality setting, the larger the JPEG file,
95and the closer the output image will be to the original input. Normally you
96want to use the lowest quality setting (smallest file) that decompresses into
97something visually indistinguishable from the original image. For this
98purpose the quality setting should be between 50 and 95; the default of 75 is
99often about right. If you see defects at
100.B \-quality
10175, then go up 5 or 10 counts at a time until you are happy with the output
102image. (The optimal setting will vary from one image to another.)
103.PP
104.B \-quality
105100 will generate a quantization table of all 1's, minimizing loss in the
106quantization step (but there is still information loss in subsampling, as well
107as roundoff error). This setting is mainly of interest for experimental
108purposes. Quality values above about 95 are
109.B not
110recommended for normal use; the compressed file size goes up dramatically for
111hardly any gain in output image quality.
112.PP
113In the other direction, quality values below 50 will produce very small files
114of low image quality. Settings around 5 to 10 might be useful in preparing an
115index of a large image library, for example. Try
116.B \-quality
1172 (or so) for some amusing Cubist effects. (Note: quality
118values below about 25 generate 2-byte quantization tables, which are
119considered optional in the JPEG standard.
120.B cjpeg
121emits a warning message when you give such a quality value, because some
122other JPEG programs may be unable to decode the resulting file. Use
123.B \-baseline
124if you need to ensure compatibility at low quality values.)
125.PP
126The
127.B \-quality
128option has been extended in IJG version 7 for support of separate quality
129settings for luminance and chrominance (or in general, for every provided
130quantization table slot). This feature is useful for high-quality
131applications which cannot accept the damage of color data by coarse
132subsampling settings. You can now easily reduce the color data amount more
133smoothly with finer control without separate subsampling. The resulting file
134is fully compliant with standard JPEG decoders.
135Note that the
136.B \-quality
137ratings refer to the quantization table slots, and that the last value is
138replicated if there are more q-table slots than parameters. The default
139q-table slots are 0 for luminance and 1 for chrominance with default tables as
140given in the JPEG standard. This is compatible with the old behaviour in case
141that only one parameter is given, which is then used for both luminance and
142chrominance (slots 0 and 1). More or custom quantization tables can be set
143with
144.B \-qtables
145and assigned to components with
146.B \-qslots
147parameter (see the "wizard" switches below).
148.B Caution:
149You must explicitly add
150.BI \-sample " 1x1"
151for efficient separate color
152quality selection, since the default value used by library is 2x2!
153.PP
154The
155.B \-progressive
156switch creates a "progressive JPEG" file. In this type of JPEG file, the data
157is stored in multiple scans of increasing quality. If the file is being
158transmitted over a slow communications link, the decoder can use the first
159scan to display a low-quality image very quickly, and can then improve the
160display with each subsequent scan. The final image is exactly equivalent to a
161standard JPEG file of the same quality setting, and the total file size is
162about the same --- often a little smaller.
163.PP
164Switches for advanced users:
165.TP
166.B \-arithmetic
167Use arithmetic coding.
168.B Caution:
169arithmetic coded JPEG is not yet widely implemented, so many decoders will be
170unable to view an arithmetic coded JPEG file at all.
171.TP
172.BI \-block " N"
173Set DCT block size. All N from 1 to 16 are possible.
174Default is 8 (baseline format).
175Larger values produce higher compression,
176smaller values produce higher quality
177(exact DCT stage possible with 1 or 2; with the default quality of 75 and
178default Luminance qtable the DCT+Quantization stage is lossless for N=1).
179.B Caution:
180An implementation of the JPEG SmartScale extension is required for this
181feature. SmartScale enabled JPEG is not yet widely implemented, so many
182decoders will be unable to view a SmartScale extended JPEG file at all.
183.TP
184.B \-dct int
185Use integer DCT method (default).
186.TP
187.B \-dct fast
188Use fast integer DCT (less accurate).
189.TP
190.B \-dct float
191Use floating-point DCT method.
192The float method is very slightly more accurate than the int method, but is
193much slower unless your machine has very fast floating-point hardware. Also
194note that results of the floating-point method may vary slightly across
195machines, while the integer methods should give the same results everywhere.
196The fast integer method is much less accurate than the other two.
197.TP
198.B \-nosmooth
199Don't use high-quality downsampling.
200.TP
201.BI \-restart " N"
202Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
203attached to the number.
204.B \-restart 0
205(the default) means no restart markers.
206.TP
207.BI \-smooth " N"
208Smooth the input image to eliminate dithering noise. N, ranging from 1 to
209100, indicates the strength of smoothing. 0 (the default) means no smoothing.
210.TP
211.BI \-maxmemory " N"
212Set limit for amount of memory to use in processing large images. Value is
213in thousands of bytes, or millions of bytes if "M" is attached to the
214number. For example,
215.B \-max 4m
216selects 4000000 bytes. If more space is needed, temporary files will be used.
217.TP
218.BI \-outfile " name"
219Send output image to the named file, not to standard output.
220.TP
221.B \-verbose
222Enable debug printout. More
223.BR \-v 's
224give more output. Also, version information is printed at startup.
225.TP
226.B \-debug
227Same as
228.BR \-verbose .
229.PP
230The
231.B \-restart
232option inserts extra markers that allow a JPEG decoder to resynchronize after
233a transmission error. Without restart markers, any damage to a compressed
234file will usually ruin the image from the point of the error to the end of the
235image; with restart markers, the damage is usually confined to the portion of
236the image up to the next restart marker. Of course, the restart markers
237occupy extra space. We recommend
238.B \-restart 1
239for images that will be transmitted across unreliable networks such as Usenet.
240.PP
241The
242.B \-smooth
243option filters the input to eliminate fine-scale noise. This is often useful
244when converting dithered images to JPEG: a moderate smoothing factor of 10 to
24550 gets rid of dithering patterns in the input file, resulting in a smaller
246JPEG file and a better-looking image. Too large a smoothing factor will
247visibly blur the image, however.
248.PP
249Switches for wizards:
250.TP
251.B \-baseline
252Force baseline-compatible quantization tables to be generated. This clamps
253quantization values to 8 bits even at low quality settings. (This switch is
254poorly named, since it does not ensure that the output is actually baseline
255JPEG. For example, you can use
256.B \-baseline
257and
258.B \-progressive
259together.)
260.TP
261.BI \-qtables " file"
262Use the quantization tables given in the specified text file.
263.TP
264.BI \-qslots " N[,...]"
265Select which quantization table to use for each color component.
266.TP
267.BI \-sample " HxV[,...]"
268Set JPEG sampling factors for each color component.
269.TP
270.BI \-scans " file"
271Use the scan script given in the specified text file.
272.PP
273The "wizard" switches are intended for experimentation with JPEG. If you
274don't know what you are doing, \fBdon't use them\fR. These switches are
275documented further in the file wizard.txt.
276.SH EXAMPLES
277.LP
278This example compresses the PPM file foo.ppm with a quality factor of
27960 and saves the output as foo.jpg:
280.IP
281.B cjpeg \-quality
282.I 60 foo.ppm
283.B >
284.I foo.jpg
285.SH HINTS
286Color GIF files are not the ideal input for JPEG; JPEG is really intended for
287compressing full-color (24-bit) images. In particular, don't try to convert
288cartoons, line drawings, and other images that have only a few distinct
289colors. GIF works great on these, JPEG does not. If you want to convert a
290GIF to JPEG, you should experiment with
291.BR cjpeg 's
292.B \-quality
293and
294.B \-smooth
295options to get a satisfactory conversion.
296.B \-smooth 10
297or so is often helpful.
298.PP
299Avoid running an image through a series of JPEG compression/decompression
300cycles. Image quality loss will accumulate; after ten or so cycles the image
301may be noticeably worse than it was after one cycle. It's best to use a
302lossless format while manipulating an image, then convert to JPEG format when
303you are ready to file the image away.
304.PP
305The
306.B \-optimize
307option to
308.B cjpeg
309is worth using when you are making a "final" version for posting or archiving.
310It's also a win when you are using low quality settings to make very small
311JPEG files; the percentage improvement is often a lot more than it is on
312larger files. (At present,
313.B \-optimize
314mode is always selected when generating progressive JPEG files.)
315.SH ENVIRONMENT
316.TP
317.B JPEGMEM
318If this environment variable is set, its value is the default memory limit.
319The value is specified as described for the
320.B \-maxmemory
321switch.
322.B JPEGMEM
323overrides the default value specified when the program was compiled, and
324itself is overridden by an explicit
325.BR \-maxmemory .
326.SH SEE ALSO
327.BR djpeg (1),
328.BR jpegtran (1),
329.BR rdjpgcom (1),
330.BR wrjpgcom (1)
331.br
332.BR ppm (5),
333.BR pgm (5)
334.br
335Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
336Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
337.SH AUTHOR
338Independent JPEG Group
339.SH BUGS
340GIF input files are no longer supported, to avoid the Unisys LZW patent.
341(Conversion of GIF files to JPEG is usually a bad idea anyway.)
342.PP
343Not all variants of BMP and Targa file formats are supported.
344.PP
345The
346.B \-targa
347switch is not a bug, it's a feature. (It would be a bug if the Targa format
348designers had not been clueless.)