Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

.resize(w, h, options) doesn't work with the "%" option #98

Closed
respectTheCode opened this Issue · 1 comment

2 participants

@respectTheCode

gm(file).resize(200, false, "%").write(file, cb) is creating this command gm "convert" "-size" "200%" ".../1.JPG" "-resize" "200%" ".../2.JPG". The -size argument doesn't support the % option and this causes the -resize to create the wrong size image. The command should be gm "convert" ".../1.JPG" "-resize" "200%" ".../2.JPG".

From experimenting it looks like including -size with an invalid size works when the image is being scaled down, but not up.

@respectTheCode

As a work around I am using .scale(200, "200%"). The options argument should be added to scale since it uses the same -geometry spec that resize uses.

@aheckmann aheckmann closed this issue from a commit
@aheckmann fixed; no long include -size with resize()
add it manually if you need it

closes #98
3d7a59c
@aheckmann aheckmann closed this in 3d7a59c
@aheckmann aheckmann referenced this issue from a commit
@aheckmann added; geometry support to -scale
relates to #98
de52b30
@dpup dpup referenced this issue from a commit
@aheckmann fixed; no long include -size with resize()
add it manually if you need it

closes #98
a5a6b9e
@dpup dpup referenced this issue from a commit
@aheckmann added; geometry support to -scale
relates to #98
0bbcd84
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.