Can you clarify some points?

How do you plan on arranging the images in the sprite file?
How will you keep track of the positions?

The simplest way I know is to sequentially append the files into one 
long image.

convert image1 image2 -background black +append result

convert result image3 -background black +append result

etc.

This will append the images side by side and if the images are not 
the same size, then will fill with black in this case. The height of 
the result image will always be the height of the tallest image.




>For a web site I have a tool that combines and compresses CSS files
>into a single file.  Since the source CSS files are in different
>directories than the destination CSS file and the files include
>relative links I have to rewrite all css url() links that are in the
>css file.
>
>
>Since I have access to all the background images while running this
>tool I would like to build a sprite file (a single image that contains
>multiple images).  Then I would replace the url() links with a link to
>the new sprite file and provide coordinates of the specific image
>within the sprite.
>
>Is there any need to do this in two passes (i.e. to find the size of
>the larges image)?  Or is it possible to just add each image to the
>sprite one image at a time, incrementally building up the final image?
>
>Thanks for any tips you can provide,
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to