node-sprite-generator
node-sprite-generator copied to clipboard
JPG support with quality option
Why have you removed JPG support? I use jimp
composer and in 0.10.2 I can still render image to JPG just by using filename with .jpg
extension, but in master I can see there's forced PNG support only (even for .jpg
extension a PNG-format file is rendered).
It's useful to have an option to choose the format. For example in my project the example sprite file sizes are:
- PNG = 4.7 MB
- JPG = 2.6 MB (quality: 100)
- JPG = 0.9 MB (quality: 90)
There's no visible quality decrease for these pictures (source images are anyway JPG-s with 90 quality) so I'd like to choose 3rd option with the smallest file.
Also, for 0.10.2 there's no option to provide JPG quality, which I've provided additionally here https://github.com/l0co/node-sprite-generator/commit/7fcd13f70bb7d35b56d112f629e600450d16ef8f