dfa1234/ngx-image-compress

vector style PNG compressed to bigger size

vivizth opened this issue · 1 comments

Most vector style PNG result in bigger size after compressed.

example files below compressed with
imageCompress.compressFile(res.image, res.orientation, 40, 100):
download
Before compress: 4922 byte
After compress: 7118 byte

download
Before compress: 9342 byte
After compress: 12330 byte
compressed

There is nothing you can do.
Vector images are always better for the size.
Compressing will produce the image pixel by pixel and will lost the vector structure.
It's like zipping a zip file; try it, it will get bigger.
Eventually you could try to reduce the size.