glue icon indicating copy to clipboard operation
glue copied to clipboard

Low prio feature request: JPG sprites

Open jvsummeren opened this issue 12 years ago • 9 comments

Hi @jorgebastida,

Sometime I need to create a sprite with only JPG's as source. I create them manually now, but whats your opinion on adding an extra option e.g. in a sprite.conf, to treat one particular folder as source for a JPG sprite.

jvsummeren avatar Sep 19 '12 09:09 jvsummeren

Glue supports both png and jpeg files as input. What are you trying to do? create a sprite using jpeg files or what do you want to do is to create a jpeg sprite?

jorgebastida avatar Oct 03 '12 19:10 jorgebastida

Hi @jvsummeren have you see my comment? Could you please give me more information about the issue? Thanks!

jorgebastida avatar Oct 08 '12 22:10 jorgebastida

Hi @jorgebastida,

Say you want to create a hover effect with a grayscale and a colored photo or when you want to combine 15 100x100 thumbnails.

jvsummeren avatar Oct 09 '12 19:10 jvsummeren

Sorry @jvsummeren I dont get your point :( Are you talking about building JPG Sprites or using JPG's as source images to create a PNG sprite?

jorgebastida avatar Nov 03 '12 16:11 jorgebastida

Building a JPG sprite if all source images are JPG's. With mixed sources I think a PNG output would be better.

jvsummeren avatar Nov 03 '12 16:11 jvsummeren

Gotcha, sounds interesting... I'll give it a try

jorgebastida avatar Nov 03 '12 16:11 jorgebastida

Ok, cool :)

jvsummeren avatar Nov 03 '12 16:11 jvsummeren

Hi, I'd like this too! We hackishly implemented it in my personal fork, but official support would be better, of course.

One thing to note is that if your input images are JPEG and you decompress them and recompress them as a big sprited JPEG, quality is going to be that much worse. So we might want to take PNG input and only compress them to JPEG once at output.

As a result, I think using @jvsummeren 's logic to choose JPG or PNG is fine but I would also like to see an option to let the user override the logic and set an output format manually. Ideally, glue should warn if you choose output=JPEG and your source images have transparency.

@jorgebastida You said that you had a feature/jpeg branch where you'd started working on this, but I don't see it here. Have you pushed the branch yet? I can try to help by reviewing code if you like.

glasserc avatar Jan 03 '13 17:01 glasserc

Hi there, seems that this issue has been opened for a while, any thoughts to add this features, I thinks that for an already great tool like glue, having the ability to create jpg sprite would be awesome. As you know the different in size between png and jpg could be of the order of 10x and having jpg output ability would mean a huge performance speed up.

flea89 avatar Apr 29 '14 14:04 flea89