Are there any good tools to make css sprites?
IDEALLY I'd want to give it a directory of images and an existing .css file that refers to those images and have it create a big image optimized with all the little images AND change my .css file to refer to those images.
At the least I'd want it to take a directory of images and generate a big sprite and the .css necessary to use each as a background.
Are there any good photoshop plugins or fully blown apps to do this?
Compass CSS Framework has automatic sprite generation.
Tonttu is Adobe AIR based application which provides easy interface for creating powerful CSS Sprites images. You can specify FiledWidth and FieldHeight or sort images.
Create CSS Sprites Images with Tonttu Desktop Tool
Here is a script that combines images via a Photoshop script into CSS sprites. It won't do a sprite map as you asked, but it will combine images in multiples of two (2, 4, 8) if they are the same size. I prefer combining similar images (normal, hover, selected, parent of selected) than having all the images in one file.
None of these tools met my requirements, so I wrote one that uses Mark Tylers's tiny image library, mtpixel (now part of mtcelledit) It isn't super extensive but it is easily extensible through mtpixel's built in functions that include: grayscale, color inversion, rotation, sharpen, quantize, posterize, flip (vertical and horizontal), transform, rgb->indexed, indexed->rgb, edge detect, emboss, drawing polygons, text and more.
All you do is pass it a set of images as args (supports png, gif and jpeg) and it will output an rgb png called sprite.png along with the useful image slicing data to stdout. I use it in bash scripts to spritify an entire directory of images and output the slicing data for automatic generation of css (with the hope of eventually making it capable of replacing existing img tags automagically with a bit of creative sed/awk)
Binary packages for puppy linux will be here:
http://murga-linux.com/puppy/viewtopic.php?t=82009
My use case only required splicing the images vertically into a new png, so that is all it does, but my source code is public domain and the mtcelledit library is gpl3. With mtpixel statically linked, the binary is <100kb (only a few kb when dynamically linked) and the only other dependencies are libpng, libjpeg and libgif (and freetype with the official mtpixel, but I didn't need the text support, so I commented out the freetype bits in the static build)
feel free to modify for your own needs:
Not clear yet if it'll make it into the core ASP.NET framework but here's a Microsoft codeplex project for csssprites :
http://aspnet.codeplex.com/releases/view/50869
if you like it - use it - or just like the idea then add a comment. I think this would be a great thing to have in the ASP.NET framework. Have not personally used it (I had to invent the wheel myself) but its got good reviews.
It includes the following components:
Features Added in Second Release:
Features under consideration for future releases:
https://github.com/northpoint/SpeedySprite
This tool takes a novel approach in that it assembles your requested images on the fly as an http service. This makes the whole process pretty simple (no preprocessing required, change images any time): You start the service and then reference whatever images you want in your HTML:
Because it's dynamic, you can even make sprites from a dynamic set of images such as a thumbnail page. Doesn't support JPEG though, but PNG and GIF works fine.