ruby on rails - Paperclip resize and crop to rectangle -



ruby on rails - Paperclip resize and crop to rectangle -

so expecting series of photos of different sizes , aspect ratios. want able shrink/stretch photo fit much can in 200x100 rectangle , crop rest not fit. want crop happen around center well. possible? confused imagemagick documentation.

thanks!

paperclip's # alternative want: fit image maximally within specified dimensions crop excess gravity @ center.

example:

has_attached_file :photo, :styles => { :original => "200x100#" }

note: if want maintain original intact , generate additional cropped thumb, alter :original key else, :thumb.

reference: http://rdoc.info/github/thoughtbot/paperclip/paperclip/classmethods

ruby-on-rails ruby imagemagick paperclip

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -