Needs review
Project:
ImageAPI
Version:
6.x-1.x-dev
Component:
ImageAPI Imagick
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2009 at 17:04 UTC
Updated:
6 Jul 2010 at 12:09 UTC
Jump to comment: Most recent file
Comments
Comment #1
nbayaman commentedHi markfoodyburton! I came from here: http://drupal.org/node/314553 where i tried to find out, why IMagick raw action module doesn't want to react to "-format" option. So it turns out, that it's crucial to specify correct output filename to "-format" option to work.
So does your replacement solve this issue?
Comment #2
egfrith commentedAt present, it is not possible to use the convert action in imagecache_coloractions.module with imageapi_imagemagick.module. This is because the $source and $dest passed to _imageapi_imagemagick_convert() have the same extension, so convert doesn't know it should change the file type.
The code snippet posted at comment #1 fixes this problem, by prepending the file type to the file name with a colon, as per convert -h:
The patch I'm posting is a tweaked version of the code posted in comment #1. I've tested that it converts jpeg to png using the imagecache_coloractions.module.
Solving this bug would also help with this feature request in imagecache: #366373: PDF support ( i.e. convert PDF to JPG support)
@nurlan.bayaman: not sure if this would fix your issue.
Comment #3
egfrith commentedHmmm.... this patch sort of works, but causes a "Failed generating image" response from imagecache because of _imageapi_imagemagick_convert() trying to check that $type:$dest is a file... I'll post a patch at #416254: Add equivalent of image_get_info() at the toolkit level that combines the fix for this along with the patch for replacing get_info().
Comment #4
drewish commentedI think this part of the patch has snuck into #416254: Add equivalent of image_get_info() at the toolkit level.
Comment #5
mavimo commentedI solved using #817290: Quality param