diff --git a/README b/README index 32e062b8..0e9b4295 100644 --- a/README +++ b/README @@ -1,7 +1,8 @@ -libjpeg-turbo note: This file is mostly taken from the libjpeg README -file, and it is included only for reference. Some parts of it may not apply to -libjpeg-turbo. Please see README-turbo.txt for information specific to the -turbo version. +libjpeg-turbo note: This file contains portions of the libjpeg v6b and v8 +README files, with additional wordsmithing by The libjpeg-turbo Project. +It is included only for reference, as some parts of it may not apply to +libjpeg-turbo. Please see README-turbo.txt for information specific to +libjpeg-turbo. The Independent JPEG Group's JPEG software @@ -256,8 +257,8 @@ ARCHIVE LOCATIONS The "official" archive site for this software is www.ijg.org. The most recent released version can always be found there in directory "files". This particular version will be archived as -http://www.ijg.org/files/jpegsrc.v8b.tar.gz, and in Windows-compatible -"zip" archive format as http://www.ijg.org/files/jpegsr8b.zip. +http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip. The JPEG FAQ (Frequently Asked Questions) article is a source of some general information about JPEG. diff --git a/cjpeg.1 b/cjpeg.1 index d3489642..6fb72993 100644 --- a/cjpeg.1 +++ b/cjpeg.1 @@ -1,4 +1,4 @@ -.TH CJPEG 1 "27 January 2012" +.TH CJPEG 1 "31 January 2012" .SH NAME cjpeg \- compress an image file to a JPEG file .SH SYNOPSIS @@ -121,7 +121,7 @@ quality-sensitive applications, for which the artifacts generated by subsampling may be unacceptable. .PP The \fB-quality\fR option accepts a comma-separated list of parameters, which -respectively refer to the quality levels which should be assigned to the +respectively refer to the quality levels that should be assigned to the quantization table slots. If there are more q-table slots than parameters, then the last parameter is replicated. Thus, if only one quality parameter is given, this is used for both luminance and chrominance (slots 0 and 1, diff --git a/jpegtran.1 b/jpegtran.1 index f10cdbb6..160b47da 100644 --- a/jpegtran.1 +++ b/jpegtran.1 @@ -1,4 +1,4 @@ -.TH JPEGTRAN 1 "11 October 2010" +.TH JPEGTRAN 1 "31 January 2012" .SH NAME jpegtran \- lossless transformation of JPEG files .SH SYNOPSIS @@ -184,7 +184,7 @@ comments and other excess baggage present in the source file. .TP .B \-copy comments Copy only comment markers. This setting copies comments from the source file -but discards any other data which is inessential for image display. +but discards any other data that is inessential for image display. .TP .B \-copy all Copy all extra markers. This setting preserves miscellaneous markers diff --git a/libjpeg.txt b/libjpeg.txt index 01535424..7b1661ba 100644 --- a/libjpeg.txt +++ b/libjpeg.txt @@ -983,7 +983,7 @@ int q_scale_factor[NUM_QUANT_TBLS] See rdswitch.c and cjpeg.c for an example of usage. Note that the q_scale_factor[] values use "linear" scales, so JPEG quality levels chosen by the user must be converted to these scales - using jpeg_quality_scaling(). Here is an example which corresponds to + using jpeg_quality_scaling(). Here is an example that corresponds to cjpeg -quality 90,70: jpeg_set_defaults(cinfo); @@ -1019,7 +1019,8 @@ The actual dimensions of the JPEG image that will be written to the file are given by the following fields. These are computed from the input image dimensions and the compression parameters by jpeg_start_compress(). You can also call jpeg_calc_jpeg_dimensions() to obtain the values that will result -from the current parameter settings. +from the current parameter settings. This can be useful if you are trying +to pick a scaling ratio that will get close to a desired target size. JDIMENSION jpeg_width Actual dimensions of output image. JDIMENSION jpeg_height diff --git a/structure.txt b/structure.txt index 779233a8..83f552f8 100644 --- a/structure.txt +++ b/structure.txt @@ -1,6 +1,6 @@ IJG JPEG LIBRARY: SYSTEM ARCHITECTURE -Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. +Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. This file is part of the Independent JPEG Group's software. For conditions of distribution and use, see the accompanying README file. @@ -385,8 +385,9 @@ objects: * Data destination manager: writes the output JPEG datastream to its final destination (e.g., a file). The destination manager supplied with the - library knows how to write to a stdio stream; for other behaviors, the - surrounding application may provide its own destination manager. + library knows how to write to a stdio stream or to a memory buffer; + for other behaviors, the surrounding application may provide its own + destination manager. * Memory manager: allocates and releases memory, controls virtual arrays (with backing store management, where required). @@ -454,8 +455,8 @@ shown are: buffered by the coefficient controller have NOT been dequantized; we merge dequantization and inverse DCT into a single step for speed reasons. When scaled-down output is asked for, simplified DCT algorithms may be used - that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8. - Works on one DCT block at a time. + that emit fewer samples per DCT block, not the full 8x8. Works on one DCT + block at a time. * Postprocessing controller: buffer controller for the color quantization input buffer, when quantization is in use. (Without quantization, this @@ -504,9 +505,9 @@ objects: * Marker reading: decodes JPEG markers (except for RSTn). * Data source manager: supplies the input JPEG datastream. The source - manager supplied with the library knows how to read from a stdio stream; - for other behaviors, the surrounding application may provide its own source - manager. + manager supplied with the library knows how to read from a stdio stream + or from a memory buffer; for other behaviors, the surrounding application + may provide its own source manager. * Memory manager: same as for compression library. @@ -586,8 +587,7 @@ as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. With these conventions, JSAMPLE values can be assumed to be >= 0. This helps simplify correct rounding during downsampling, etc. The JPEG standard's specification that sample values run from -128..127 is accommodated by -subtracting 128 just as the sample value is copied into the source array for -the DCT step (this will be an array of signed ints). Similarly, during +subtracting 128 from the sample value in the DCT step. Similarly, during decompression the output of the IDCT step will be immediately shifted back to 0..255. (NB: different values are required when 12-bit samples are in use. The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be diff --git a/usage.txt b/usage.txt index 7af75a8c..4902c9bb 100644 --- a/usage.txt +++ b/usage.txt @@ -131,7 +131,7 @@ quality-sensitive applications, for which the artifacts generated by subsampling may be unacceptable. The -quality option accepts a comma-separated list of parameters, which -respectively refer to the quality levels which should be assigned to the +respectively refer to the quality levels that should be assigned to the quantization table slots. If there are more q-table slots than parameters, then the last parameter is replicated. Thus, if only one quality parameter is given, this is used for both luminance and chrominance (slots 0 and 1, @@ -157,6 +157,11 @@ file size is about the same --- often a little smaller. Switches for advanced users: + -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG + is not yet widely implemented, so many decoders will + be unable to view an arithmetic coded JPEG file at + all. + -dct int Use integer DCT method (default). -dct fast Use fast integer DCT (less accurate). -dct float Use floating-point DCT method. @@ -201,11 +206,6 @@ factor will visibly blur the image, however. Switches for wizards: - -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG - is not yet widely implemented, so many decoders will - be unable to view an arithmetic coded JPEG file at - all. - -baseline Force baseline-compatible quantization tables to be generated. This clamps quantization values to 8 bits even at low quality settings. (This switch is poorly @@ -250,10 +250,11 @@ The basic command line switches for djpeg are: djpeg runs noticeably faster in this mode. -scale M/N Scale the output image by a factor M/N. Currently - the scale factor must be 1/1, 1/2, 1/4, or 1/8. - Scaling is handy if the image is larger than your - screen; also, djpeg runs much faster when scaling - down the output. + the scale factor must be M/8, where M is an integer + between 1 and 16 inclusive, or any reduced fraction + thereof (such as 1/2, 3/4, etc. Scaling is handy if + the image is larger than your screen; also, djpeg runs + much faster when scaling down the output. -bmp Select BMP output format (Windows flavor). 8-bit colormapped format is emitted if -colors or -grayscale @@ -447,9 +448,9 @@ To specify the coded JPEG representation used in the output file, jpegtran accepts a subset of the switches recognized by cjpeg: -optimize Perform optimization of entropy encoding parameters. -progressive Create progressive JPEG file. + -arithmetic Use arithmetic coding. -restart N Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is attached to the number. - -arithmetic Use arithmetic coding. -scans file Use the scan script given in the specified text file. See the previous discussion of cjpeg for more details about these switches. If you specify none of these switches, you get a plain baseline-JPEG output @@ -527,7 +528,7 @@ markers, such as comment blocks: present in the source file. -copy comments Copy only comment markers. This setting copies comments from the source file but discards - any other data which is inessential for image display. + any other data that is inessential for image display. -copy all Copy all extra markers. This setting preserves miscellaneous markers found in the source file, such as JFIF thumbnails, Exif data, and Photoshop settings.