summaryrefslogtreecommitdiff
path: root/plugins/FreeImage/Source/LibJPEG/cjpeg.c
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-30 17:27:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-30 17:27:49 +0000
commit88708cffa15662dcd2755fce699112d24a10a087 (patch)
tree55d362220b42a52b52eaef2254f894c9a61fb4fd /plugins/FreeImage/Source/LibJPEG/cjpeg.c
parent7fa5563a954339f3feeb156285ef56bfde7cbec8 (diff)
update for zlib & FreeImage
git-svn-id: http://svn.miranda-ng.org/main/trunk@238 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FreeImage/Source/LibJPEG/cjpeg.c')
-rw-r--r--plugins/FreeImage/Source/LibJPEG/cjpeg.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/FreeImage/Source/LibJPEG/cjpeg.c b/plugins/FreeImage/Source/LibJPEG/cjpeg.c
index b20162e6e4..a999eeef1c 100644
--- a/plugins/FreeImage/Source/LibJPEG/cjpeg.c
+++ b/plugins/FreeImage/Source/LibJPEG/cjpeg.c
@@ -2,7 +2,7 @@
* cjpeg.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
- * Modified 2003-2010 by Guido Vollbeding.
+ * Modified 2003-2011 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -152,6 +152,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
@@ -165,6 +166,9 @@ usage (void)
fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
#endif
fprintf(stderr, "Switches for advanced users:\n");
+#ifdef C_ARITH_CODING_SUPPORTED
+ fprintf(stderr, " -arithmetic Use arithmetic coding\n");
+#endif
#ifdef DCT_SCALING_SUPPORTED
fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n");
#endif
@@ -189,9 +193,6 @@ usage (void)
fprintf(stderr, " -outfile name Specify name for output file\n");
fprintf(stderr, " -verbose or -debug Emit debug output\n");
fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
- fprintf(stderr, " -arithmetic Use arithmetic coding\n");
-#endif
fprintf(stderr, " -baseline Force baseline quantization tables\n");
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
@@ -263,9 +264,8 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
} else if (keymatch(arg, "block", 2)) {
/* Set DCT block size. */
-#if defined(DCT_SCALING_SUPPORTED) && defined(JPEG_LIB_VERSION_MAJOR) && \
- (JPEG_LIB_VERSION_MAJOR > 8 || (JPEG_LIB_VERSION_MAJOR == 8 && \
- defined(JPEG_LIB_VERSION_MINOR) && JPEG_LIB_VERSION_MINOR >= 3))
+#if defined DCT_SCALING_SUPPORTED && JPEG_LIB_VERSION_MAJOR >= 8 && \
+ (JPEG_LIB_VERSION_MAJOR > 8 || JPEG_LIB_VERSION_MINOR >= 3)
int val;
if (++argn >= argc) /* advance to next argument */
@@ -310,6 +310,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;