Strange behavior with thumbnails / transform_to and offset? #1083

earnold opened this Issue Nov 13, 2012 · 2 comments


None yet

2 participants


I have this image as an attachment:

And using the standard paperclip/attachment logic, I am trying to scale it to a fairly large thumbnail:

medium_large: "315x315#"

However, this is generating a very strangely proportioned result:

I believe this has something to do with the cropping logic. The line that is generated reads:

convert '/var/folders/jf/ncy107c13jd9t09ll1prg8c000011y/T/open-uri20121112-7126-15clxbq20121112-7126-1m9osuz[0]' -auto-orient -resize "x315" -crop "315x315+79+0" +repage '/var/folders/jf/ncy107c13jd9t09ll1prg8c000011y/T/open-uri20121112-7126-15clxbq20121112-7126-1m9osuz20121112-7126-t08fl4'

I find myself wondering if the crop ratio is off. When I experiment with this locally, it generates strangely dimensioned result. Specifically, it creates two tiles which +repage attempts to assemble.

Do you have any thoughts on how I could further debug this?


I also wonder if this maybe related to issue #1028

thoughtbot, inc. member

Yeah, it almost certainly was related. I think I've fixed the problem and have pushed a fix to master. Please let me know if it works for you.

@jyurek jyurek closed this Nov 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment