Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.2.0
-
None
-
Operating System: Ubuntu
PHP Version: 5.5.2
Database and version: MySQL 5.0.60
Browser (and version): N/A
Description
It seems that the shell string parameters order in the command line built by lib/ezimage/classes/ezimageshellhandler.php is wrong with ImageMagick ( 6.4.4 installed on our server ).
Example of a shell string generated by eZImageShellHandler :
/usr/bin/convert [options] 'source.jpg' 'JPEG:destination.jpg'
When using the filter shown in the "Steps to reproduce", this command line doesn't work.
It must be :
/usr/bin/convert 'source.jpg' [options] 'JPEG:destination.jpg'
So, you have to :
move this line ( 111 )
$argumentList[] = eZSys::escapeShellArgument( $sourceMimeData['url'] );
after this line ( 78 )
$argumentList[] = $executable;
in lib/ezimage/classes/ezimageshellhandler.php.
With this change, the command line works.
I don't know if this is a bug or an ImageMagick specific case...
Steps to reproduce
1. Create a new filter and a new alias in image.ini.append.php :
[ImageMagick]
Filters[]=geometry/scaleexactwithbackgroundcolor=-resize %1x%2> -size %1x%2 xc:#%3 +swap -gravity center -composite
[AliasSettings]
AliasList[]=my_image
[my_image]
Reference=reference
Filters[]=geometry/scaleexactwithbackgroundcolor=400;100;00FF00
2. Create a class with an image attribute
3. Create a new object
4. In a template, display this image using the my_image alias. This doesn't work : the command line built by the convert function of eZImageShellHandler class is wrong : the source file is at the end of the command line ( before the destination file ) instead of being at the beginning