ImageMagick support for more image types
wrunt - June 11, 2008 - 13:32
| Project: | ImageAPI |
| Version: | 7.x-1.x-dev |
| Component: | ImageAPI Imagick |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
This patch accompanies http://drupal.org/node/269327. It modifies the ImageMagick toolkit to use the 'identify' command to identify images, and allows it to convert between image types.

#1
Here's the patch.
#2
this would need to happen in D6 and then be backported
#3
#4
This should use http://api.drupal.org/api/function/file_get_mimetype/6 instead.
Also, I'm not sure what to do with this issue and #269327: Support for more image types (PDF, TIFF, EPS, etc.). Both seem to depend on the core patch in #269337: Support for more image types (PDF, TIFF, EPS, etc.), which has not been committed yet and would only be available in D7.
#5
I believe that imageapi is heading for core:
http://lists.drupal.org/pipermail/development/2009-March/032407.html
, so I wonder if it would be worth seeing if this patch would have a good home at: #416254: Add equivalent of image_get_info() at the toolkit level
But I'm not 100% sure exactly what is going on with image stuff in D7.
#6
I'm moving this issue to what I think is a more suitable home in imageapi, and posting a patch to imageapi that should work with the patch to core at: #269337: Support for more image types (PDF, TIFF, EPS, etc.).
There is already a patch to imageapi containing similar code, but this is for the 6.x version of imageapi #416254: Add equivalent of image_get_info() at the toolkit level, and I'd rather keep this separate.
At present this patch seems to work, though I have been having problems with the ordering elements in the admin form, which I haven't yet resolved. However, it does allow you to test the functionality.
#7
#8
I've discovered that the _imageapi_imagemagick_convert() trying to check that $type:$dest is a file, which then fails. See #375218: Changing file type with imagemagick. Will try to update the patch soonish, but not tonight...
#9
I'll revise this patch once the equivalent patch for D6, #416254: Add equivalent of image_get_info() at the toolkit level, has been reviewed.