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

windows is not defined. #13

Open
shashank519 opened this issue Aug 28, 2019 · 0 comments
Open

windows is not defined. #13

shashank519 opened this issue Aug 28, 2019 · 0 comments

Comments

@shashank519
Copy link

shashank519 commented Aug 28, 2019

Tried this but the output is not any image.
I am passing array of buffer for the images in "mergeImg" function. Getting the JSON in response mentioned below:

Jimp {
  _background: 0,
  bitmap: {
    data: <Buffer 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 ... 79950 more bytes>,
    width: 200,
    height: 100
  }
}

mergeImg([image1.buffer, image2.buffer]).then(
 img => {
  console.log(img) //output -> getting the json mentioned above.
  var finalOutput =  "data:image/png;base64,"+img.bitmap.data.toString("base64");// pt-1
   img.write("out.png", () => console.log("done"));
 }
);

After this I am trying to get convert image into base 64 using the buffer data as stated at "pt-1" but the output base-64 data is coming as blank image.

What i need is the base-64 format of image in finalOutput.

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

No branches or pull requests

1 participant