In Bitmap.php, around line 284, the code adds the -define option that requires ImageMagick 6.5.6-2, but it doesn't check the version of ImageMagick first. It looks like this:
// JPEG decoder hint to reduce memory, available since IM 6.5.6-2
$decoderHint = "-define jpeg:size={$params['physicalDimensions']}";
Later down in the file, it's done correctly like this:
if ( version_compare( $this->getMagickVersion(), "6.3.5" ) >= 0 ) {
$animation_post = '-fuzz 5% -layers optimizeTransparency +map';
}
Since -define is an optional flag here it should be wrapped in a version check as well.
Version: 1.20.x
Severity: normal