Problem with ie6

17 views
Skip to first unread message

Christophe

unread,
Nov 15, 2011, 8:05:37 AM11/15/11
to SmartSprites CSS Sprite Generator Users and Developers
Hi there,

I have been using smartsprites to redo a whole website to make its css
sprite.
I am having some problem with the command --sprite-png-ie6.

The problem is that, when I want to create a sprite that is large it
adds an orange color to the sprite generated for ie6.
I can generate an ie6 sprite with only 29 css rules(29 images), bigger
than this quota it gives the orange image bug.

Is there a quota that is allocated to the sprite or is it something
that I missed?

This is the sprite created from the 29 images: http://postimage.org/image/93s7qz70b/

And this is the image created by adding one more image to the sprite:
http://postimage.org/image/sjhos22bf/

Thanking you in advance if i can get any help from you :)

Christophe



Stanislaw Osinski

unread,
Nov 15, 2011, 9:41:18 AM11/15/11
to smartsprites-css...@googlegroups.com
Hi Christophe,

Looking very quickly at your sprite built from 29 images -- it has 256 colors, which is the maximum for 8-bit PNGs required by IE6. Adding more images forces SmartSprites to reduce the palette to 256 colors, which not always looks great, as in your case. In fact, you should be seeing a warning along the lines of: "Sprite '%s' requires %d colors, but the maximum for indexed color mode is %d. Image quality will be degraded.".

The solution is to make sure your sprites don't have more than 256 colors, e.g. by taking some "color-space-consuming" images (gradients etc.) out of the sprite and putting them in a separate sprite. Another option is to create the IE6 sprites manually by reducing the regular 24-bit PNG into an 8-bit one in Photoshop (whose color reduction algorithms are probably much better than SmartSprites'). 

Cheers,

Staszek

Christophe

unread,
Nov 15, 2011, 11:32:37 PM11/15/11
to SmartSprites CSS Sprite Generator Users and Developers
Hi Staszek,

Thank you very much for your quick response, i really appreciate your
help.
I will do as you tell.

Have a good day,

Christophe
Reply all
Reply to author
Forward
0 new messages