Hey guys,
So im trying to get image cropping to work on Amazon S3, I have the following function
def update_attributes(att)
scaled_img = Magick::ImageList.new(self.photo.to_file)
orig_img = Magick::ImageList.new(self.photo.to_file(:original))
scale = orig_img.columns.to_f / scaled_img.columns
args = [ att[:x1], att[:y1], att[:width], att[:height] ]
args = args.collect { |a| a.to_i * scale }
orig_img.crop!(*args)
orig_img.write(self.photo.to_file(:original))
self.photo.reprocess!
self.save
super(att)
end
This is working fine offline, all ive changed to deploy this on Heroku + S3 is "to_file" the error message im receiving is
undefined method `columns' for Magick::ImageList
Im a little bit out of depth so im not sure how to debug this, any help would be greatly appreciated, I have been wrestling with this all weekend.