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

Append doesn't accept a buffer #251

Open
Koosmann opened this issue Jan 26, 2014 · 6 comments · May be fixed by #467
Open

Append doesn't accept a buffer #251

Koosmann opened this issue Jan 26, 2014 · 6 comments · May be fixed by #467

Comments

@Koosmann
Copy link

I'm trying to the append images together that are stored in buffers like so:

gm(firstBuffer).append(secondBuffer, true).write('appendedImage.jpg', function(...

This firstBuffer always works, but the secondBuffer is never recognized (it only works when append is passed a filepath).

@ahdezm
Copy link

ahdezm commented Jan 26, 2014

Same problem, gm.append only accepts file paths. Neither buffers not streams work

gm(stream).append(stream)

When the image is written to disk only the original image stream is there

@jonathanong
Copy link
Contributor

this is similar to #211. difficult to stdin multiple images as buffers

@Awk34
Copy link

Awk34 commented Oct 28, 2014

Bump. Is there any plan to fix this? If not, I'll just have to write to a temp file. I'm trying to make a sprite out of some GridFS files, would rather not involve the regular FS if I don't have to. Or I could be not lazy and try to make a PR. Meh.

@rwky
Copy link
Contributor

rwky commented Oct 28, 2014

@Awk34 make a pull request! If not someone else might make a PR, I've had a few people fixing bugs the past few weeks maybe one of them will pick this up.

@Awk34
Copy link

Awk34 commented Oct 30, 2014

@rwky well, that would take actually figuring out the fix for this first.. I haven't done much more than poking around the source code

mpotra added a commit to mpotra/gm that referenced this issue Nov 5, 2015
@mpotra mpotra linked a pull request Nov 5, 2015 that will close this issue
otaviosoares pushed a commit to otaviosoares/gm that referenced this issue Sep 4, 2017
otaviosoares added a commit to otaviosoares/gm that referenced this issue Sep 4, 2017
* 251-accept-buffer:
  Adds Stream support for append()
  Use writeFile instead of gm write
  Fixes aheckmann#251 Append doesn't accept a buffer
  Add dependency: `tmp`
@VesperQuartz
Copy link

I need this so badly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants