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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -