Page MenuHomePhabricator

Bitmap.php uses -define in ImageMagick configuration line which requires ImageMagick 6.5.6-2 but doesn't do a version check
Closed, ResolvedPublic

Description

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

Details

Reference
bz32874
TitleReferenceAuthorSource BranchDest Branch
builds-builder: bump to 0.0.80-20231023142438-55d11e16repos/cloud/toolforge/toolforge-deploy!120dcarobump_builds-buildermain
apt use pipefailrepos/cloud/toolforge/builds-builder!16dcaroapt_use_pipefailmain
DO NOT MERGE: build: use pipefail to not shadow command errorsrepos/cloud/toolforge/buildpacks/apt-buildpack!1dcaroenable_pipefailmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:05 AM
bzimport set Reference to bz32874.
bzimport added a subscriber: Unknown Object (MLST).
Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:10 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:21 AM