Add cjpeg -rgb option from jpeg-8d

This commit is contained in:
DRC
2013-01-01 10:25:43 +00:00
parent f0f1ce1b7f
commit 7d12636291
5 changed files with 27 additions and 1 deletions

View File

@@ -30,6 +30,9 @@ without having to pass -Djava.library.path=/usr/lib to java.
the performance of the TurboJPEG Java API. It can be run with
'java -cp turbojpeg.jar TJBench'.
[8] cjpeg can now be used to generate JPEG files with the RGB colorspace
(feature ported from jpeg-8d.)
1.2.1
=====

View File

@@ -4,6 +4,15 @@ information relevant to libjpeg-turbo.
CHANGE LOG for Independent JPEG Group's JPEG software
Version 8d 15-Jan-2012
-----------------------
Add cjpeg -rgb option to create RGB JPEG files.
Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace.
Thank to Michael Koch for the initial suggestion.
Version 8b 16-May-2010
-----------------------

View File

@@ -49,6 +49,11 @@ By saying
.BR \-grayscale ,
you'll get a smaller JPEG file that takes less time to process.
.TP
.B \-rgb
Create RGB JPEG file.
Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace.
.TP
.B \-optimize
Perform optimization of entropy encoding parameters. Without this, default
encoding parameters are used.

View File

@@ -3,7 +3,7 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2008 by Guido Vollbeding.
* Modified 2003-2011 by Guido Vollbeding.
* Modifications:
* Copyright (C) 2010, D. R. Commander.
* For conditions of distribution and use, see the accompanying README file.
@@ -155,6 +155,7 @@ usage (void)
fprintf(stderr, "Switches (names may be abbreviated):\n");
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n");
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
fprintf(stderr, " -rgb Create RGB JPEG file\n");
#ifdef ENTROPY_OPT_SUPPORTED
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
#endif
@@ -289,6 +290,10 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
/* Force a monochrome JPEG file to be generated. */
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
} else if (keymatch(arg, "rgb", 3)) {
/* Force an RGB JPEG file to be generated. */
jpeg_set_colorspace(cinfo, JCS_RGB);
} else if (keymatch(arg, "maxmemory", 3)) {
/* Maximum memory in Kb (or Mb with 'm'). */
long lval;

View File

@@ -80,6 +80,10 @@ The basic command line switches for cjpeg are:
saying -grayscale, you'll get a smaller JPEG file that
takes less time to process.
-rgb Create RGB JPEG file.
Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace.
-optimize Perform optimization of entropy encoding parameters.
Without this, default encoding parameters are used.
-optimize usually makes the JPEG file a little smaller,