#1206598: Add support for changing destination image format allows for the alteration of image file formats via ImageMagick toolkit actions.

Attached is a patch that provides an initial implementation of image_imagemagick_convert_image.

Comments

fietserwin’s picture

Status: Active » Needs review
StatusFileSize
new3.88 KB

Rerolled the patch against the current dev version. In contrast with the comments in the current dev versions that this does not work, it does, but you have to use a recent version of the imagemagick module.

Note: patch also removes incorrect white space.

dman’s picture

Patch applies ok, but functionality still doesn't seem to behave as hoped for.
From a test-suite example (rounded corners plus convert to png) it doesn't fail, but doesn't end up as a png either.

Debug: ImageMagick command:
/sw/bin/convert '/Library/WebServer/Documents/drupal7/sites/images/files/nile_st-2009-097.JPG' -resize 400x300!  \( +clone  -threshold -1  -draw ' fill black polygon 0,0 0,24 24,0  fill white circle 24,24 24,0  fill black polygon 376,0 400,0 400,24  fill white circle 376,24 376,0  fill black polygon 0,276 0,300 24,300  fill white circle 24,276 0,276  fill black polygon 376,300 400,276 400,300  fill white circle 376,276 400,276  '  \) +matte -compose CopyOpacity -composite  -quality '75' '/Library/WebServer/Documents/drupal7/sites/images/files/styles/test_convert/public/nile_st-2009-097.JPG'
in _imagemagick_convert_exec() (line 456 of /Library/WebServer/Documents/drupal7/sites/all/modules/contrib/imagemagick/imagemagick.module).

The version of imagemagick is the most recent stable one available for my up-to-date test platform

convert --version
Version: ImageMagick 6.2.8 06/11/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

... but I'm not even seeing the conversion parameter in that commandline.

On my test install, modules are
Image 7.10-dev
Imagecache Actions 7.x-dev
ImageMagick 7.x-1.0-alpha2

What are the extra steps that are needed to make this a happening thing? I lost a day on it last time and got nowhere - I don't know how to progress this if there is something that I'm missing.
The target conversion format parameter didn't exist when we tried to do a d7 upgrade, and I wasn't aware it had gone stable. Good news if it does eventually get in.

fietserwin’s picture

With recent version of imagemagick module I meant any version after the fix of #1206598-14: Add support for changing destination image format on july 14, 2011. So only the current published dev will work.

fietserwin’s picture

Status: Needs review » Fixed

This already got committed before.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.