iconbin icon indicating copy to clipboard operation
iconbin copied to clipboard

Add spritesheets to the delivery method

Open DaBs opened this issue 9 years ago • 2 comments

As titlen suggests. A user should be capable of requesting a spritesheet with a given array of icons in it. Discussion about implementation below.

DaBs avatar Jun 08 '16 16:06 DaBs

This is a feature I would very much like to see as well. Implementation might be hairy though. The whole concept of iconbin relies on the built-in "afterburner" we get with any file hosted on Github though MaxCDN. Generating images dynamically will require a dedicated caching layer. And the integration of C libs like imagemagick to composite Bitmaps is not something I would wanna tackle right now. However, we could offer individual downloads of SVG spritesheets that reference Base64 encoded bitmap data or other SVGs. Like so <image width="100" height="100" xlink:href="data:image/png;base64,...">.

psolbach avatar Jun 08 '16 17:06 psolbach

Is it naive to believe that perhaps the spritesheet service should only be available for svgs, to, as you said yourself, rid us of having to do image manipulation for now?

I'm imagining that, much like the current solution, people can go into a SVG spritesheet editor and pick and choose the icons they'd like from the icon repo. Once a spritesheet has been made this way, it gets named according to a naming convention we have, saved to the GitHub repo and thus becomes something other users can take advantage of. Or the API could do the same automatically for you when you attempt a GET request, based on some parameters, just as long as we're not dealing with bitmaps.

DaBs avatar Jun 10 '16 09:06 DaBs