Amazon S3で画像のトリミングを機能させようとしているので、次の機能があります
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
これはオフラインで正常に動作しています。これを Heroku + S3 にデプロイするために変更したのはすべて「to_file」です。受信しているエラー メッセージは次のとおりです。
undefined method `columns' for Magick::ImageList
私は少し深みがないので、これをデバッグする方法がわかりません。