Muffinresearch Labs by Stuart Colville

CSS Sprite Generator Version 2.0 | Comments (2)

Posted in Code, performance on 24th June 2008, 1:29 am by Stuart

Website Performance.org Sprite Generator

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.

Post Tools

Comments: Add yours

1. On August 11th, 2008 at 6:52 pm Matthias Willerich said:

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?

2. On August 11th, 2008 at 6:57 pm Matthias Willerich said:

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!







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(2)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.538s.