imagemagick - Rails peperclip - help crop the image -


welcome, crop image,

has_attached_file: image, styles: {show: '540x505 #'}

trims needed, centered on (up), need image not centralized, , trimmed top

original image:

enter image description here

need:

enter image description here

you want set -gravity option north when defining paperclip's style. like...

has_attached_file: image,      styles: {show: '540x505'},     convert_options: {show: ' -gravity north '} 

see documents & example usage here.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -