Skip to content

Loading…

extent method behaves incorrectly #103

Closed
santip opened this Issue · 1 comment

2 participants

@santip

the extent method is calling this.in('-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
@aheckmann
Owner

fixed in 1.8.0

@dpup dpup added a commit that referenced this issue
@aheckmann fixed; remove -size arg from extent
closes #103
5ae28f5
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.