CoreImage Resizes Main Attachment As Well As Thumbnails
Reported by Paul Mucur | April 4th, 2008 @ 06:20 AM
When using the CoreImage processor and specifying a thumbnail, attachment_fu will both create a thumbnail with the specified dimensions and resize the original image to the thumbnail size. Manually setting resize_to does not seem to affect it and it seems to be down to the CoreImage processor's resizing method.
I tried adding "self.temp_path = random_tempfile_filename" to the resize_image method and, while this seemed to fix it, a duplicate thumbnail was created at RAILS_ROOT.
I am using the plugin as of commit 9610d9cc764026727 on Mac OS X 10.5.2 with Rails 2.0.2 and no other image processors installed.
Comments and changes to this ticket
-
Christoph Lupprich May 18th, 2008 @ 09:30 AM
Had the same problem and attached a patch (including a test).
The problem was that the original image file was overwritten by the thumbnails.
-
crafterm May 21st, 2008 @ 10:51 PM
Hi All,
Thanks for the information and patch. Christoph, I've just applied your patch to http://github.com/crafterm/attac... and sent a pull request to Technoweenie to integrate upstream.
Much appreciated guys, good find.
Cheers,
Marcus
-
Rick May 22nd, 2008 @ 08:27 PM
- State changed from new to resolved
Pushed to github: http://github.com/technoweenie/a...
Thanks everyone!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป