Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format inference with buffers and streams #429

Closed
adurrive opened this issue Aug 6, 2015 · 2 comments
Closed

Format inference with buffers and streams #429

adurrive opened this issue Aug 6, 2015 · 2 comments

Comments

@adurrive
Copy link
Contributor

adurrive commented Aug 6, 2015

There is no format inference from the filename for input buffers or streams. Format inference from the file signature doesn't work with some formats like ico:

gm('/path/to/img.ico').size(function (err, size) { ...  });

{ width: 64, height: 64 }

buffer = fs.readFileSync('/path/to/img.ico');
gm(buffer, 'img.ico').size(function (err, size) { ...  }); 

stream = fs.createReadStream('/path/to/img.ico');
gm(stream, 'img.ico').size({bufferStream: true}, function (err, size) { ...  }); 

{ [Error: Command failed: gm identify: No decode delegate for this image format (/tmp/gm3mwq).
gm identify: Request did not return an image.
] code: 1, signal: null }

@adurrive adurrive changed the title Format inference with buffers Format inference with buffers and streams Aug 6, 2015
@adurrive
Copy link
Contributor Author

Fixed by #430

@freund17
Copy link
Contributor

There is no format inference from the filename for input buffers or streams. 

I created a PR for that: #701

aheckmann added a commit that referenced this issue Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants