karfcz / grunt-sprite-packer

A grunt plugin that converts multiple png files into single sprite file using efficient packer algorithm.
MIT License
11 stars 5 forks source link

Add support for JPG #2

Closed fredw closed 11 years ago

fredw commented 11 years ago

Hi,

I did a test with images in JPG but the plugin exports as PNG. Do you intend to support JPG at some point?

Thanks!

karfcz commented 11 years ago

Currently only png file is generated but adding jpg output support should be an easy fix. But it is generally not a good idea to create jpg sprite from jpg files because of double recompression.

fredw commented 11 years ago

I'm not an expert in image compression, but as I researched the data, the disadvantage of making the sprite to jpeg is the issue of color, adding different jpegs into a single image usually file size is greater than the sum of many separate images. Even following this premise, it would be interesting to provide support? As much as the image size increases, in some cases it is more advantageous to unify the images to obtain a single request.

karfcz commented 11 years ago

It's fixed, see readme. I just didn't yet discovered how to mark an issue as resolved on github :)