Displaying 1 result from an estimated 1 matches for "make_thumbnail".
2006 Mar 27
3
RMagick and thumbnails
...to replicate this for a thumbnail version
of the original image:
thumbnail = Thumbnail.new
thumbnail.name = ''thumbnail_'' + @picture.name.to_s
thumbnail.content_type = @picture.content_type
thumbnail.data = @picture.data
thumbnail.make_thumbnail
thumbnail.save
I get the following error on the make_thumbnail method:
ArgumentError (can''t decode image):
/app/models/thumbnail.rb:11:in `read_inline''
/app/models/thumbnail.rb:11:in `make_thumbnail''
Here''s the Thumbnail model:
require ...