Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2215)

Unified Diff: djpeg.c

Issue 1270213002: Add support for decoding to 565 to libjpeg_turbo (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@master
Patch Set: Link crbug in the README Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.chromium ('k') | jdcol565.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: djpeg.c
diff --git a/djpeg.c b/djpeg.c
index 925ca8a8d71aaf90ee726bfec9478b0d3009cc54..237ed515190a4a71cdf34c39c89f478eb239fbe5 100644
--- a/djpeg.c
+++ b/djpeg.c
@@ -110,6 +110,7 @@ usage (void)
fprintf(stderr, " -fast Fast, low-quality processing\n");
fprintf(stderr, " -grayscale Force grayscale output\n");
fprintf(stderr, " -rgb Force RGB output\n");
+ fprintf(stderr, " -rgb565 Force RGB565 output\n");
#ifdef IDCT_SCALING_SUPPORTED
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
#endif
@@ -288,6 +289,10 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
/* Force RGB output. */
cinfo->out_color_space = JCS_RGB;
+ } else if (keymatch(arg, "rgb565", 2)) {
+ /* Force RGB565 output. */
+ cinfo->out_color_space = JCS_RGB565;
+
} else if (keymatch(arg, "map", 3)) {
/* Quantize to a color map taken from an input file. */
if (++argn >= argc) /* advance to next argument */
« no previous file with comments | « README.chromium ('k') | jdcol565.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698