Skip to content


extent method behaves incorrectly #103

santip opened this Issue · 1 comment

2 participants


the extent method is calling'-size', geometry) which is causing the outcome to be different than expected.

i have an image of 200x100 and I want to extend it to 200x200 adding white background.

in the command line,

$ gm convert source.jpg -extent 200x200+0-50 target.jpg

does the trick

However, when using img.extent(200, 200, '+0-50') it's running

$ gm convert -size 200x200+0-50 source.jpg -extent 200x200+0-50 target.jpg

which produces a completely different outcome.

I can work around it by calling:

gm('source.jpg').extent(200, 200, '+0-50').in('-size', '200x100').write(...)
@aheckmann aheckmann closed this in 6bf0e8c

fixed in 1.8.0

@dpup dpup added a commit that referenced this issue
@aheckmann fixed; remove -size arg from extent
closes #103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.