For my project, I use canvas of fabric.js to create an label, that will be print on thermo-thing.
So I need to generate a PNG with bit-depth (color-depth) equals to 1.
I put all my elements with even black or white colors, but canvas.toDataURL( {format: “png”}) create a file with bit-depth equals to 32.
Do anyone knows how I can :
- force this bit-depth
- or modify generated image depth ?
I saw there is toBlob function, but I don’t know if I can do this transformation with it ?
(if some of my english is wrong, sorry, I tried my best)
Thank you
Rina is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.