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.

Comments

wrunt’s picture

StatusFileSize
new6.45 KB

Here's the patch.

drewish’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev
Status: Needs review » Needs work

this would need to happen in D6 and then be backported

wrunt’s picture

sun’s picture

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.

egfrith’s picture

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.

egfrith’s picture

Project: Image » ImageAPI
Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: imagemagick toolkit » Code
Status: Needs work » Needs review
StatusFileSize
new11.1 KB

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.

egfrith’s picture

Component: Code » ImageAPI Imagick
egfrith’s picture

Status: Needs review » Needs work

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...

egfrith’s picture

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.