CSS Sprite Sheets
Posted: 2013-04-08T02:42:34-07:00
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?
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?