Merge branch 'main' into dev
This commit is contained in:
2
djpeg.c
2
djpeg.c
@@ -314,7 +314,9 @@ parse_switches(j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
icc_filename = argv[argn];
|
icc_filename = argv[argn];
|
||||||
|
#ifdef SAVE_MARKERS_SUPPORTED
|
||||||
jpeg_save_markers(cinfo, JPEG_APP0 + 2, 0xFFFF);
|
jpeg_save_markers(cinfo, JPEG_APP0 + 2, 0xFFFF);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "map", 3)) {
|
} else if (keymatch(arg, "map", 3)) {
|
||||||
/* Quantize to a color map taken from an input file. */
|
/* Quantize to a color map taken from an input file. */
|
||||||
|
|||||||
@@ -330,11 +330,13 @@ static int setCompDefaults(tjhandle handle, int pixelFormat, int subsamp,
|
|||||||
else
|
else
|
||||||
jpeg_set_colorspace(cinfo, JCS_YCbCr);
|
jpeg_set_colorspace(cinfo, JCS_YCbCr);
|
||||||
|
|
||||||
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
if (flags & TJFLAG_PROGRESSIVE)
|
if (flags & TJFLAG_PROGRESSIVE)
|
||||||
jpeg_simple_progression(cinfo);
|
jpeg_simple_progression(cinfo);
|
||||||
#ifndef NO_GETENV
|
#ifndef NO_GETENV
|
||||||
else if (!GETENV_S(env, 7, "TJ_PROGRESSIVE") && !strcmp(env, "1"))
|
else if (!GETENV_S(env, 7, "TJ_PROGRESSIVE") && !strcmp(env, "1"))
|
||||||
jpeg_simple_progression(cinfo);
|
jpeg_simple_progression(cinfo);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (flags & TJFLAG_ARITHMETIC)
|
if (flags & TJFLAG_ARITHMETIC)
|
||||||
cinfo->arith_code = TRUE;
|
cinfo->arith_code = TRUE;
|
||||||
@@ -2047,8 +2049,10 @@ DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
jpeg_mem_dest_tj(cinfo, &dstBufs[i], &dstSizes[i], alloc);
|
jpeg_mem_dest_tj(cinfo, &dstBufs[i], &dstSizes[i], alloc);
|
||||||
jpeg_copy_critical_parameters(dinfo, cinfo);
|
jpeg_copy_critical_parameters(dinfo, cinfo);
|
||||||
dstcoefs = jtransform_adjust_parameters(dinfo, cinfo, srccoefs, &xinfo[i]);
|
dstcoefs = jtransform_adjust_parameters(dinfo, cinfo, srccoefs, &xinfo[i]);
|
||||||
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
if (flags & TJFLAG_PROGRESSIVE || t[i].options & TJXOPT_PROGRESSIVE)
|
if (flags & TJFLAG_PROGRESSIVE || t[i].options & TJXOPT_PROGRESSIVE)
|
||||||
jpeg_simple_progression(cinfo);
|
jpeg_simple_progression(cinfo);
|
||||||
|
#endif
|
||||||
if (flags & TJFLAG_ARITHMETIC || t[i].options & TJXOPT_ARITHMETIC)
|
if (flags & TJFLAG_ARITHMETIC || t[i].options & TJXOPT_ARITHMETIC)
|
||||||
cinfo->arith_code = TRUE;
|
cinfo->arith_code = TRUE;
|
||||||
if (!(t[i].options & TJXOPT_NOOUTPUT)) {
|
if (!(t[i].options & TJXOPT_NOOUTPUT)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user