Forum: Ruby on Rails Cropped thumbnails with ImageScience

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Demec (Guest)
on 2009-03-30 23:13
(Received via mailing list)
I have a Photo model (below) and as you can see I create some
thumbnails. However I want to create a proportionally thymbnail, which
basically will be a cropped version, so that the thumbnail will be a
perfect square.
I use attachment_fu and ImageScience to handle photo uploads. Can
anyone help me or give me a hint on how to create my cropped
thumbnails ?


class Photo < ActiveRecord::Base

  belongs_to :user

  has_attachment   :content_type => :image,
                   :storage => :file_system,
                   :size => 1.byte..12.megabytes,
                   :thumbnails => { :thumb => '125x83>' , :MS =>
'500x333>' },
                   :path_prefix => "/public/photos/"

  validates_as_attachment


end


Thanks,
Demetris.
This topic is locked and can not be replied to.