summaryrefslogtreecommitdiff
path: root/trunk/djpeg.c
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-03-03 16:58:47 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-03-03 16:58:47 +0000
commite77a711dd86cc60776fbbbec915cb16ed2db7121 (patch)
treec70da08267c12d598429b1949470fc5732c7f8b7 /trunk/djpeg.c
parentf6a5d119cfa8e88ef47b83c30d7b6a0f824afa04 (diff)
Add an option to force grayscale->RGB conversion (needed for jpgtest regression test)
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@493 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'trunk/djpeg.c')
-rw-r--r--trunk/djpeg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/trunk/djpeg.c b/trunk/djpeg.c
index 466973f..0dd4f24 100644
--- a/trunk/djpeg.c
+++ b/trunk/djpeg.c
@@ -2,7 +2,7 @@
* djpeg.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
- * Copyright (C) 2010, D. R. Commander.
+ * Copyright (C) 2010-2011, D. R. Commander.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -103,6 +103,7 @@ usage (void)
fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
fprintf(stderr, " -fast Fast, low-quality processing\n");
fprintf(stderr, " -grayscale Force grayscale output\n");
+ fprintf(stderr, " -rgb Force RGB output\n");
#ifdef IDCT_SCALING_SUPPORTED
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
#endif
@@ -268,6 +269,10 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
/* Force monochrome output. */
cinfo->out_color_space = JCS_GRAYSCALE;
+ } else if (keymatch(arg, "rgb", 2)) {
+ /* Force RGB output. */
+ cinfo->out_color_space = JCS_RGB;
+
} else if (keymatch(arg, "map", 3)) {
/* Quantize to a color map taken from an input file. */
if (++argn >= argc) /* advance to next argument */