Thanks for your comments. I realize my initial wording might have been confusing, so I have attempted to clarify what I'm looking for...
I use Inkscape for designing and exporting app assets. These assets are created a 4x scale (which corresponds to xxxhdpi
on Android or @4x
on iOS). Let's assume I have several vector icons that are 256x256 pixels within a single SVG opened in Inkscape. I need to export each of these icons at the following resolutions:
- 22.50 dpi (
mdpi
for Android) -> 64x64 pixels - 33.75 dpi (
hdpi
for Android) -> 96x96 pixels - 45.00 dpi (
xhdpi
for Android,@2x
for iOS) -> 128x128pixels - 67.50 dpi (
xxhdpi
for Android,@3x
for iOS) -> 192x192 pixels
Doing this manually is really tedious. My question is thus: Is there an efficient way to export one or several specific objects within an SVG file at multiple resolutions from within Inkscape?
Note: I have hacked together a working, scripted solution that invokes svg-objects-export multiple times, but it is very slow and inconvenient, because I need to adapt the script every time I add an asset to the SVG file.
Ideally, I'm looking for a solution from within Inkscape ("Click and export", possibly for multiple selected objects at once). If that's not possible I'll take the next best option. A command line solution would be fine, as long as it's fast and automatically exports all assets in a file.
For quality reasons, I am also not looking for a solution to scale down exported PNGs.
--export-id
, though. I was hoping to find a solution that would just allow me to export all objects in the SVG. Such an option does not seem to exist, though.--export-id
as @KlaasNotFound mentioned seems like a perfectly fine solution to me if you give areas a predictable name. Personally I would just split it up into separate SVG files, and have a script run through each file in a directory. While this is probably a common use-case for Inkscape, it simply doesn't have the capability to do what you are asking (as is--I'm sure an extension could be written). I'd be curious if Illustrator has this feature.