Adding support for Imageapi (i.e. not just #618024: Add support for ImageAPI when creating admin_thumb) would allow exif data to be retained when using the imagemagick toolkit, on resizing uploaded images that need to fit the imagefield maximum size.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Title: Add support for ImageAPI » Add support for ImageAPI when scaling to fit within max dimensions
Project: ImageField » FileField

Oddly the code for scaling down images isn't even in ImageField, it's in FileField's filefield_validate_image_resolution() function. This is a good request though, I'm just moving it over into the proper queue.

quicksketch’s picture

Status: Active » Needs review
FileSize
7.25 KB
1.71 KB

The code fix is in FileField, but the description text is in ImageField... sigh. Here's a set of patches that makes these changes. Please review and let me know if this looks like it does the job for you.

kdebaas’s picture

Status: Needs review » Reviewed & tested by the community

You made my day. Thanks!

- I can confirm that resizing on upload, and on using imagecache presets for the imagefield, the imagemagick toolkit is used
- Preserving EXIF works, both on the imagefield and its imagecache derivatives.
- In the content type admin screen, when adding a field, it correctly states that exif data is not preserved, when the gd toolkit is used. When using the imagemagick one, that message is omitted.

I had a problem initially, that Exif data was not preserved with the imagemagick toolkit. But I discovered that was because I had a "forked" kit installed on my ubuntu 9.10 linux computer, which was installed as a dependency of the application Devede.

In a few days I hope to be able to report the results on my CentOS server. (actually, I hope there will be nothing to report ;-)

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Fantastic, thanks for testing. I tried this out locally also and found that it's working as expected (most of the code is identical to #618024: Add support for ImageAPI when creating admin_thumb). I've committed to both ImageField and FileField. We're already primed for a new release, hopefully it should be out Wednesday next week.

Status: Fixed » Closed (fixed)

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