Niels
unread,Apr 15, 2009, 12:29:02 PM4/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Paperclip Plugin
Hi folks,
I'm searching for a possibility to tell ImageMagick through Paperclip
that it should generate the cropping not with a centered focus, but
with a focus on top.
My szenario is an upload of a PDF file, where I get generated the
thumbnails from the first page. But I want a cropped version with
60x60 pixel, starting on the top of the first page of the pdf. At the
moment my declaration is working with this config:
has_attached_file :media,
:styles => { :thumbnail => ["60x60#", :png], :normal =>
["600x600>", :png] },
:default_style => :normal,
:storage => :filesystem,
:default_url => "/files/:class/missing_:style.png",
:url => "/files/:class/:hashing/:id/:style/:basename.:extension",
:path => ":rails_root/public/
files/:class/:hashing/:id/:style/:basename.:extension"
I think I have to pass "-gravity Center" to ImageMagick, but it
doesn't work out, when I try this in the convert_options. Does anybody
have an advice for me - would be very nice.
Thanks for your help.
Niels.