4 ms·
> It takes about 30 second to build all those PNGs Wow! I run a similar automated set up (for a game), with the flow being: Photoshop layer gets edited -> PNG
by fenomas 9y ago
> It takes about 30 second to build all those PNGs
Wow! I run a similar automated set up (for a game), with the flow being: Photoshop layer gets edited -> PNG gets exported -> PNG gets post-processed in Node -> all PNGs get stitched into a texture map, and even with ~100 images it runs in a few hundred milliseconds.
Unless InkScape does special SVG stuff I don't know about, I suspect that using something like ImageMagick, or even some random svg2png.js/py script, would make this instant - and thus something you can just add to your build process, rather than worrying about triggering it only when the source files have changed.
- HelloNurse 9y agoThe script in the article creates an Inkscape process for each exported file, I'm surprised it's so fast. I'd look into Python scripting to do the export from a running instance of Inkscape at the press of a button.
- fenomas 9y agoThat's one approach, but for something that amounts to a build step the ideal case is not to have to press a button. For one thing, in a case like this the source images are probably in a repository and the converted images aren't, so you can wind up needing to open Inkscape and run the script to keep them in sync.
- Glyptodon 9y agoWouldn't be surprised if a lot of the time is spent loading and unloading Inkscape. That said, I can't imagine even a moderate batch conversion/export job only taking a few hundred milliseconds unless it's somehow barely doing any work, or the total file size of all exports/renders is pretty small.
- chris84948 9y agoYeah, speed wasn't really an issue for my build. I'm just running it occasionally. This was basically a step better than manually exporting.
- fenomas 9y agoSure - but the main thing isn't the time taken, it's having one-step builds. Things that only need to be done occasionally are the easiest things to forget!
- ygra 9y agoIME when it comes to converting SVGs your only quality options tend to be Batik or Inkscape. Neither is particularly lightweight, but so is SVG. Sure, trivial shapes and paint servers should work with pretty much anything, but things tend to not stay that trivial.