Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Resizing does not work on buffers #113

Closed
unlucio opened this Issue · 9 comments

3 participants

@unlucio

Hi,
I'm trying to manipulate and resize and image.

If I prev load the image in a buffer (self.decodedFile)

gm(this.decodedFile).
autoOrient().
resize(50, 50, "%").
write('resize.png', function(err) {
  console.log('err: ', err);
});

The same doesnt' work even if I specify the filename as in the doc and examples:

gm(this.decodedFile, this.fileName).
autoOrient().
resize(50, 50, "%").
write('resize.png', function(err) {
  console.log('err: ', err);
});

the resulting image is not scaled, and is identical to the loaded one

If I start giving the image file name everything works fine.

gm("orig.jpeg").
resize(50, 50, '%').
write('resize_2.jpg', function(err) {
  console.log("err: ", err);
});

I think Im missing something here, any suggestion?

@aheckmann
Owner

which version of gm?

@unlucio

gm v: 1.8.0
GraphicsMagick: 1.3.17

@unlucio

I tried manually pulling the 1.8.1-pre but nothing changes :)

@shargors

Same here. Resizing of file images works. But does not work for buffers.

If a file image is resized to a smaller size and is written to a file, why is that file bigger than the original one?

@aheckmann
Owner

@shargors not sure. Does using graphicsmagick directly cause the same issue? If not we should confirm we pass the correct args. Maybe checkout what the graphicsmagick docs say about it.

@aheckmann aheckmann referenced this issue from a commit
@aheckmann tests; add test case for #113
fix was in #105

closes #113
8c8f0d7
@aheckmann aheckmann closed this issue from a commit
@aheckmann tests; add test case for #113
fix was in #105

closes #113
8c8f0d7
@aheckmann aheckmann closed this in 8c8f0d7
@aheckmann
Owner

fix is in 1.8.1

@shargors
@aheckmann
Owner

@shargors as I previously mentioned, please investigate with graphicsmagick directly as all we do is pass arguments to the gm binary. Please post your findings.

@shargors
@dpup dpup referenced this issue from a commit
@aheckmann tests; add test case for #113
fix was in #105

closes #113
f0dbb72
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.