Skip to content

windows is not defined. #13

Description

@shashank519

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions