Reset scans to value expected by the TJ API

Fixes #260
This commit is contained in:
Kornel
2017-05-25 16:32:23 +01:00
parent 12909e6a0f
commit a9bfef2a57

View File

@@ -2115,6 +2115,10 @@ DLLEXPORT int DLLCALL tjTransform(tjhandle handle,
&xinfo[i]);
if(!(t[i].options&TJXOPT_NOOUTPUT))
{
#ifdef C_PROGRESSIVE_SUPPORTED
if (cinfo->num_scans != 0) /* process -progressive; -scans can override */
jpeg_simple_progression(cinfo);
#endif
jpeg_write_coefficients(cinfo, dstcoefs);
jcopy_markers_execute(dinfo, cinfo, JCOPYOPT_ALL);
}