Fix issue with jpegtran and RGB/CMYK colorspaces
Fixes issues #23 #24 #31 Note that the original jpgcrush script optimizes scans only for YCbCr and grayscale color spaces. Scan optimization is thus disabled for RGB and CMYK color spaces and behavior reverts to the fast mode of jpgcrush which uses predefined scans
This commit is contained in:
@@ -38,6 +38,10 @@ LOCAL(void) transencode_coef_controller
|
||||
GLOBAL(void)
|
||||
jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)
|
||||
{
|
||||
/* setting up scan optimisation pattern failed, disable scan optimisation */
|
||||
if (cinfo->num_scans_luma == 0)
|
||||
cinfo->optimize_scans = FALSE;
|
||||
|
||||
if (cinfo->global_state != CSTATE_START)
|
||||
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
||||
/* Mark all tables to be written */
|
||||
|
||||
Reference in New Issue
Block a user