CSS Sprite Sheets

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
nniico
Posts: 6
Joined: 2011-02-08T08:15:21-07:00
Authentication code: 8675308

CSS Sprite Sheets

Post by nniico »

Hello,
I'm trying to generate CSS sprite sheets from series of images of different size. My first attempt was to use PHP ou BASH to get the image size and generate the command line for montage and the corresponding CSS. It was not very powerful. Basically, it required rewriting montage :?

Then, I discovered that montage can generate image maps. I could generate the map, then parse it to generate the CSS. But there may be a smarter way to do this?
  • is it possible to extract the image placement information directly from montage?
    Someting like -extract-map "map.data" ?
  • is there a command I didn't find that can directly output the CSS?
Thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: CSS Sprite Sheets

Post by anthony »

At this time no these is nothing to extract just the map data.

Also not that it does not work for concatenate mode of montage.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply