Skip to content

Commit

Permalink
Disable LOSSLESS_SUPPORTED checks for libjpeg turbo because they brea…
Browse files Browse the repository at this point in the history
…k with their latest code.
  • Loading branch information
dlemstra committed Feb 2, 2023
1 parent 924e07d commit 35e05cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions coders/jpeg.c
Expand Up @@ -1278,7 +1278,7 @@ static Image *ReadJPEGImage_(const ImageInfo *image_info,
"Scale factor: %.20g",(double) scale_factor);
}
#if (JPEG_LIB_VERSION >= 61) && defined(D_PROGRESSIVE_SUPPORTED)
#if defined(D_LOSSLESS_SUPPORTED)
#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(D_LOSSLESS_SUPPORTED)
image->interlace=jpeg_info->process == JPROC_PROGRESSIVE ?
JPEGInterlace : NoInterlace;
image->compression=jpeg_info->process == JPROC_LOSSLESS ?
Expand Down Expand Up @@ -2531,11 +2531,7 @@ static MagickBooleanType WriteJPEGImage_(const ImageInfo *image_info,
}
else
{
#if !defined(C_LOSSLESS_SUPPORTED)
quality=100;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"Quality: 100");
#else
#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(C_LOSSLESS_SUPPORTED)
if (image->quality < 100)
(void) ThrowMagickException(&image->exception,GetMagickModule(),
CoderWarning,"LosslessToLossyJPEGConversion","`%s'",image->filename);
Expand All @@ -2558,6 +2554,10 @@ static MagickBooleanType WriteJPEGImage_(const ImageInfo *image_info,
"Point Transform: %d",point_transform);
}
}
#else
quality=100;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"Quality: 100");
#endif
}
option=GetImageOption(image_info,"jpeg:extent");
Expand Down

0 comments on commit 35e05cb

Please sign in to comment.