Sprite: impossible to load gif images #292

Closed
aurelien-baudet opened this Issue Mar 2, 2011 · 10 comments

Comments

Projects
None yet
8 participants
@aurelien-baudet

When using the sprite feature, it fails when loading gif images
@import "smileys/*.gif";

Fails with:
Line 4: File to import not found or unreadable: smileys/*.gif

@hagenburger

This comment has been minimized.

Show comment Hide comment
@hagenburger

hagenburger Mar 2, 2011

Contributor

Compass Sprites uses chunky_png which supports PNG files only. This way you don’t need to use RMagick which is known to have struggles while installing. Please convert your GIF files to PNG (you won’t have any difference in the resulting sprite map).

Contributor

hagenburger commented Mar 2, 2011

Compass Sprites uses chunky_png which supports PNG files only. This way you don’t need to use RMagick which is known to have struggles while installing. Please convert your GIF files to PNG (you won’t have any difference in the resulting sprite map).

@chriseppstein

This comment has been minimized.

Show comment Hide comment
@chriseppstein

chriseppstein Mar 2, 2011

Member

There's a plugin to compass coming that uses rmagick instead of chunkypng. For people who install this plugin, I think this can be made to work so I reopened it.

Member

chriseppstein commented Mar 2, 2011

There's a plugin to compass coming that uses rmagick instead of chunkypng. For people who install this plugin, I think this can be made to work so I reopened it.

@scottdavis

This comment has been minimized.

Show comment Hide comment
@scottdavis

scottdavis Mar 2, 2011

Member

Noted ill add this to my feature list for the plugin

Member

scottdavis commented Mar 2, 2011

Noted ill add this to my feature list for the plugin

@MarioRicalde

This comment has been minimized.

Show comment Hide comment
@MarioRicalde

MarioRicalde May 11, 2011

Contributor

I found this issue when I was working with it the other day; somehow I didn't find a comment pointing out that the sprites were only for png's. Maybe we should add this as an important note on the documentation?

Contributor

MarioRicalde commented May 11, 2011

I found this issue when I was working with it the other day; somehow I didn't find a comment pointing out that the sprites were only for png's. Maybe we should add this as an important note on the documentation?

@chriseppstein

This comment has been minimized.

Show comment Hide comment
@chriseppstein

chriseppstein May 11, 2011

Member

Sure. but user's don't read docs so we should probably have a better error message in compass.

Member

chriseppstein commented May 11, 2011

Sure. but user's don't read docs so we should probably have a better error message in compass.

@davetheninja

This comment has been minimized.

Show comment Hide comment
@davetheninja

davetheninja Nov 29, 2011

@hagenburger - You say "you won’t have any difference in the resulting sprite map" but for people unfortunate enough to still have a requirement to support IE6 (like me) PNG wont cut the mustard.

PNG transparency is not supported in IE6 :-(

@hagenburger - You say "you won’t have any difference in the resulting sprite map" but for people unfortunate enough to still have a requirement to support IE6 (like me) PNG wont cut the mustard.

PNG transparency is not supported in IE6 :-(

@hagenburger

This comment has been minimized.

Show comment Hide comment
@hagenburger

hagenburger Nov 29, 2011

Contributor

@davetheninja this issue is about loading GIFs. The result would not differ if you load a GIF or 8 bit PNG.

For saving images: You can set the PNG output file to 256 colors (IE6 does support 1 bit PNG transparency just like for GIFs). This configuration should work (sorry, I can’t test it at the moment):

Compass.configuration.chunky_png_options[:color_mode] = ChunkyPNG::COLOR_INDEXED
Contributor

hagenburger commented Nov 29, 2011

@davetheninja this issue is about loading GIFs. The result would not differ if you load a GIF or 8 bit PNG.

For saving images: You can set the PNG output file to 256 colors (IE6 does support 1 bit PNG transparency just like for GIFs). This configuration should work (sorry, I can’t test it at the moment):

Compass.configuration.chunky_png_options[:color_mode] = ChunkyPNG::COLOR_INDEXED
@davetheninja

This comment has been minimized.

Show comment Hide comment
@davetheninja

davetheninja Nov 29, 2011

Most most most excellent sir!

On 29 Nov, 2011, at 6:59 PM, Nico Hagenburger
reply@reply.github.com
wrote:

@davetheninja this issue is about loading GIFs. The result would not differ if you load a GIF or 8 bit PNG.

For saving images: You can set the PNG output file to 256 colors (IE6 does support 1 bit PNG transparency just like for GIFs). This configuration should work (sorry, I can’t test it at the moment):

Compass.configuration.chunky_png_options[:color_mode] = ChunkyPNG::COLOR_INDEXED


Reply to this email directly or view it on GitHub:
chriseppstein#292 (comment)

Most most most excellent sir!

On 29 Nov, 2011, at 6:59 PM, Nico Hagenburger
reply@reply.github.com
wrote:

@davetheninja this issue is about loading GIFs. The result would not differ if you load a GIF or 8 bit PNG.

For saving images: You can set the PNG output file to 256 colors (IE6 does support 1 bit PNG transparency just like for GIFs). This configuration should work (sorry, I can’t test it at the moment):

Compass.configuration.chunky_png_options[:color_mode] = ChunkyPNG::COLOR_INDEXED


Reply to this email directly or view it on GitHub:
chriseppstein#292 (comment)

@tuomassalo

This comment has been minimized.

Show comment Hide comment
@tuomassalo

tuomassalo Oct 10, 2012

The error message and documentation still seem to lack the note about not supporting gif files.

The error message and documentation still seem to lack the note about not supporting gif files.

@tilsammans

This comment has been minimized.

Show comment Hide comment
@tilsammans

tilsammans Mar 19, 2013

@chriseppstein is the documentation something others can update quickly? I just spent an hour trying to sprite a .gif and it seems like a quick thing to add to the documentation.

@chriseppstein is the documentation something others can update quickly? I just spent an hour trying to sprite a .gif and it seems like a quick thing to add to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment