grunt-imagine icon indicating copy to clipboard operation
grunt-imagine copied to clipboard

spritesheet generation is faulty

Open yonidor opened this issue 10 years ago • 5 comments
trafficstars

I have an issue where i generate sprites using the sprites task, and the output has different colors on some of the images pixels. This means that the spritesheet generation tool manipulate with the original images somehow.

yonidor avatar Dec 09 '14 21:12 yonidor

This definitely looks like a bug in grunt-imagine. And yes, of course it is "manipulating" the images somehow. It reads the image contents & then generates a new one, technically it is converting all of the image sources into one new big image (using some weird trickery & canvas elements in PhantomJS, because that is the only "package" you can use to manipulate images that can be downloaded as a binary & works on all systems).

Can you reproduce this issue with images other than the ones you experienced it first. Second question would be, if you could send me some sample image, so that I can reproduce & debug it.

asciidisco avatar Apr 22 '15 14:04 asciidisco

I wonder if the color space or bit depth could have an impact as well.

LaurentGoderre avatar Apr 22 '15 14:04 LaurentGoderre

Most probably, could also be some gibberish the tool added, the png was created with.

asciidisco avatar Apr 22 '15 15:04 asciidisco

Well, it was a long time ago, i do not remember the exact set of images that had the problem. anyway, i would just like to add that when using grunt-spritesmith to generate spritesheets, when using it's phantomJs engine, the same issue happened. so i assume it has to do directly with Phantom.

yonidor avatar Apr 23 '15 13:04 yonidor

@yonidor That´s some useful information, thank you.

It´s more a "well, what can go wrong" solution, but maybe we should upgrade to Phantom2 & hope that issues like this are resolved in its engine.

asciidisco avatar Apr 23 '15 13:04 asciidisco