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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | filefield_resize_imageapi.patch | 1.71 KB | quicksketch |
| #2 | imageapi_resize_description.patch | 7.25 KB | quicksketch |
Comments
Comment #1
quicksketchOddly 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.
Comment #2
quicksketchThe 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.
Comment #3
kdebaas commentedYou 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 ;-)
Comment #4
quicksketchFantastic, 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.