Hey guys,
Perhaps I skipped over this in the docs, but is there a way to capture the image's width and height? I'm trying to center text in the image and need the overall dimensions to calculate the positioning.
I found for myself this way: image.bitmap.height
So f.e.:
Jimp.read(imagePath).then((image) => {
image
image.print(font, 10, 10, imageFirstWord, image.bitmap.height)
.resize(Jimp.AUTO, 1920)
.write(imagePath)
}).catch((err) => {
console.error(err)
})
Most helpful comment
I found for myself this way:
image.bitmap.heightSo f.e.: