Add cjpeg -rgb option from jpeg-8d

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@880 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2013-01-01 10:25:43 +00:00
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 the performance of the TurboJPEG Java API. It can be run with
'java -cp turbojpeg.jar TJBench'. '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 1.2.1
===== =====

View File

@@ -4,6 +4,15 @@ information relevant to libjpeg-turbo.
CHANGE LOG for Independent JPEG Group's JPEG software 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 Version 8b 16-May-2010
----------------------- -----------------------

View File

@@ -49,6 +49,11 @@ By saying
.BR \-grayscale , .BR \-grayscale ,
you'll get a smaller JPEG file that takes less time to process. you'll get a smaller JPEG file that takes less time to process.
.TP .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 .B \-optimize
Perform optimization of entropy encoding parameters. Without this, default Perform optimization of entropy encoding parameters. Without this, default
encoding parameters are used. encoding parameters are used.

View File

@@ -3,7 +3,7 @@
* *
* This file was part of the Independent JPEG Group's software: * This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1998, Thomas G. Lane. * Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2008 by Guido Vollbeding. * Modified 2003-2011 by Guido Vollbeding.
* Modifications: * Modifications:
* Copyright (C) 2010, D. R. Commander. * Copyright (C) 2010, D. R. Commander.
* For conditions of distribution and use, see the accompanying README file. * 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, "Switches (names may be abbreviated):\n");
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\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, " -grayscale Create monochrome JPEG file\n");
fprintf(stderr, " -rgb Create RGB JPEG file\n");
#ifdef ENTROPY_OPT_SUPPORTED #ifdef ENTROPY_OPT_SUPPORTED
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
#endif #endif
@@ -289,6 +290,10 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
/* Force a monochrome JPEG file to be generated. */ /* Force a monochrome JPEG file to be generated. */
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); 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)) { } else if (keymatch(arg, "maxmemory", 3)) {
/* Maximum memory in Kb (or Mb with 'm'). */ /* Maximum memory in Kb (or Mb with 'm'). */
long lval; 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 saying -grayscale, you'll get a smaller JPEG file that
takes less time to process. 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. -optimize Perform optimization of entropy encoding parameters.
Without this, default encoding parameters are used. Without this, default encoding parameters are used.
-optimize usually makes the JPEG file a little smaller, -optimize usually makes the JPEG file a little smaller,