On Sat, 02 Jun 2012 02:37:00 +0400 Kostya Vasilyev <kmans...@gmail.com> wrote:
> On 06/02/2012 02:31 AM, Jeremy Villalobos wrote: > > It would be nice to have a folder for svg's on the Android project > > (Eclipse), and have a tool that automatically creates the icons for > > each screen based on the svg provided by the designer. > > > > On build, the plugin creates the png's from the svg's, but the svgs > > are not added to the release package. > > > > Is there such a tool ? > > FWIW, I save my artwork as PNGs at -xhdpi resolution and then run a > script to update the lower-res versions: > > http://kmansoft.com/2012/05/23/scale-android-drawables-with-a-script/ > > Supposedly you can do svg to png conversion with ImageMagick, or with > Inkscape: > > http://stackoverflow.com/questions/9530524/imagemagick-convert-svg-to-transparent-png-with-antialiasing > > So, with just a little scripting, it should be possible to do what > you're after. I do exactly this with the convert tool from imagemagick in Debian GNU/Linux. I don't know how to get eclipse/ant to automate it so I've written a Makefile, which also runs a script to make texture atlases. The convert commands are something like this: convert -background '#0000' othersrc/vpad.svg -geometry 192x192 \ res/drawable-hdpi/vpad.png but in the Makefile I have to add a backslash (\) before the '#'. On Debian and Ubuntu etc you also need the package librsvg2-bin. And imagemagick+librsvg is broken on Ubuntu Lucid, better use inkscape instead in that case. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en