Open pniederlag opened 9 years ago
png has different formats or say ways to store pixels. This is also sometimes refererd to as png-8 or png-24 (as gimp calls it). Some more details can be found on Wikipedia http://en.wikipedia.org/wiki/Portable_Network_Graphics#Pixel_format
As the image to which I am referring is a transparent black and white image the question would be wether is possible to force and indexed color palette (as used in the input png) in the resulting image via gulp-responsive and/or sharp.
Hi @lovell
Could you please help me with this issue?
Hello, libvips supports reading of PNG images with 1, 2, 4, 8 and 16 bits per channel and writing of PNG images with 8 and 16 bits per channel.
1, 2 and 4-bit input PNG images with their own palette are converted to RGB before further processing. Support for downsampling (quantise+dither) from 8 bit to 1, 2 or 4 bit would be an enhancement to libvips.
For now, the withoutAdaptiveFiltering method can help reduce the size of output PNG images, especially if they originate from 1, 2, or 4 bit input PNG images.
@lovell Thanks you!
It seems gulp-responsive doesn't work correctly with png-8. I've created 2nd pass task for png images with imagemin-pngquant.
I have an 826x517 pixel input png. It has a filesize of 9kb (9008 bytes)
Using gulp-resize with width: 200 on the image gives me a resulting file with 17kb (16939 bytes) size.
Is this just a matter of settings(compressionLevel, ...) or is this an expected behaviour?