search for: create_or_update_thumbnail

Displaying 2 results from an estimated 2 matches for "create_or_update_thumbnail".

2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
...cene.hscale.to_f img = Magick::Image.read("#{RAILS_ROOT}/ public#{scene.avatar.public_filename}")[0] chopped = img.crop(Magick::ForgetGravity, x1, y1, width, height) path = "#{RAILS_ROOT}/public/images/avatars/yings/ #{self.id}_thing.png" chopped = chopped.write(path) #create_or_update_thumbnail(path, suffix, *size) end avatar_system.rb attr_accessor :uploaded_avatar_data def save_with_avatar(params) avatar = Avatar.new begin self.transaction do if params[:uploaded_avatar_data] && params[:uploaded_avatar_data].size > 0 avata...
2009 Jul 24
1
Attachment_fu - watermark tmp file before saved to S3
Hi there, I''d like to use RMagick to watermark an image in the tmp directory before Attachment_fu saves it to Amazon S3. I took a look at the callbacks available in attachment_fu. There''s an ''after_attachment_saved'' method but this would be too late, and a ''before_thumbnail_saved'' but this is no good because it''s for thumbnails. I