Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/juce_graphics/image_formats/jpglib/jdmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ master_selection (j_decompress_ptr cinfo)
if (cinfo->raw_data_out)
ERREXIT(cinfo, JERR_NOTIMPL);
/* 2-pass quantizer only works in 3-component color space. */
if (cinfo->out_color_components != 3) {
if (cinfo->out_color_components != 3 ||
cinfo->out_color_space == JCS_RGB565) {
cinfo->enable_1pass_quant = TRUE;
cinfo->enable_external_quant = FALSE;
cinfo->enable_2pass_quant = FALSE;
Expand Down
3 changes: 2 additions & 1 deletion modules/juce_graphics/image_formats/jpglib/jquant2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,8 @@ jinit_2pass_quantizer (j_decompress_ptr cinfo)
cquantize->error_limiter = NULL;

/* Make sure jdmaster didn't give me a case I can't handle */
if (cinfo->out_color_components != 3)
if (cinfo->out_color_components != 3 ||
cinfo->out_color_space == JCS_RGB565)
ERREXIT(cinfo, JERR_NOTIMPL);

/* Allocate the histogram/inverse colormap storage */
Expand Down