CSS Sprite Generator Version 2.0 | Comments (2)
Posted in Code, performance on 24th June 2008, 1:29 am by Stuart
![]()
Ed and I have been busy updating the CSS Sprite Generator to improve it’s output quality by using the Imagick library instead of GD and as a result this allows a much tighter control over the output. In the process of doing this we’ve fixed the large majority of all outstanding bugs with the previous version.
A nice addition to this version is the ability to be able to compress the output (assuming it’s png) with the optipng library. This can reduce the image by a significant amount without affecting the output quality so it’s well worth investigating.
The branch on launchpad.net will be updated in the next few days and we welcome any bug reports, comments and suggestions on the site.
We’re currently considering adding an API interface to the site and would be interested to head anyone’s thought on whether they think that would be useful. Clearly for a build script a CLI interface might be something that’s higher up on the wishlist and if that’s you then please let us know.
With the additions to the site there’s a few strings on the site that need to be translated. If you can help us out by contributing those translations or a completely new translation that hasn’t been created yet then please contact us.

I’ve seen sprites cropping up everywhere in the last year or so, and have been using the simple hover-state version for quite a while.
Now, I seem to remember that there used to be issues with pixel-positioning background images, but for the hell of it I can’t remember when it stopped, or if it was simply my limited skillset of the past (think 2003 and earlier). IE6 seems fine wherever I test it, and I doubt I was ever very busy testing in Opera, so I wouldn’t know that.
As I don’t see it on the website-performance site, do you happen to remember any brokenness with this technology in the dark web past? I’m thinking Mac IE 5.2 here, or Netscape 7(before 7.2, or or…)? Maybe I’m just remembering it wrong? Can you put my doubts to rest?
Ha,
not wanting to leave your questions unanswered: I was actually considering to build a tool like yours last week (as your PR didn’t reach me until now), combined with a TTF-to-png renderer, as I have all the pieces lying around anyway. But rendering the images and sending them to an API or get it done via CLI sounds EVEN better, because then I don’t have to build it, but only do the integration. Hurray! To avoid relying on availability, I’d probably prefer CLI and run it myself. Man, this is like an early Christmas here. All wishes and gifts!