Is there any way to convert a PNG file to 8 bit-depth?
I've tried the following, with some variations (With GraphicsMagic module, gm):
gm(`${IMAGE_PROCESSING_SD}images_thumbs_sd_${i + 1}.png`)
.bitdepth(8)
.write(`${IMAGE_PROCESSING_SD}images_thumbs_sd_${i + 1}.png`, () => {
console.log('finished 8 bit conversion');
});
But it keeps having 32 bit-depth on some images, 24 in others. Not sure what i'm doing wrong.