I am using paperclip gem for image processing.
In some images, I need to slice the top 35 pixels of the original image, and then do the transforms and processing
I am currently using
:convert_options => {
all: lambda{ |instance| "#{!instance.chop_top.blank? ? '-chop 0x35' : '' } -limit memory 64 -limit map 128"},
mobile_sm: "-resize 620 -quality 90 -strip -interlace Plane",
mobile_lg: "-resize 1280 -quality 80 -strip -interlace Plane",
feature: "-quality 90 -strip -interlace Plane",
medium: "-quality 85 -strip -interlace Plane",
preview: "-quality 85 -strip -interlace Plane",
tiny: "-quality 90 -strip -interlace Plane"}
This works mainly, but mobile_lgit seems that grinding occurs after resizing (and, I think, this happens on others, it is just less noticeable)
How can I use -chopit to do this before resizing?
source
share