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.
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:
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.