Automating Export of .png files

Post questions on how to use or achieve an effect in Inkscape.
alextrosta
Posts: 1
Joined: Mon Oct 02, 2017 12:22 pm

Automating Export of .png files

Postby alextrosta » Mon Oct 02, 2017 12:29 pm

I need to create a collection of images, where each image:

1) Is created using the star and polygons tool
2) Each new image is created by incrementing the 'Rounded' parameter by 0.01 (Resulting in, for example, a collection of 50 stars, where the 1st star has a Rounded value of 0.000 and the 50th, 0.500.

I have done this manually, but would like to create other collections (in a similar manner) by manipulating the 'Randomized' parameter.

Does anyone know of a way of automatizing the export of .png files (as opposed to me repeating the above process manually) ?

Thank you!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Automating Export of .png files

Postby Lazur » Mon Oct 02, 2017 6:35 pm

Hi.

Hey it looks like you tryingt to make an animation.

Checking the star object in an svg with a notepad it looks the star is stored as a path -with inkscape specific sodipodi tag; meaning illustrator wouldn't open the star as a star but as a path-.
With <animate> tags a large variety of svg elements can be animated (with smil ?). Upon testing it seems the rounding of the custom element's parametre is out of the range. Either that or just I couldn't get it working.

On the other hand, if you convert the object to path you are able to make a morphing animation covering the same thing.
Check this post for a working example.

How to capture animated svg-s to a gif "properly" -besides with a screen recorder- I cannot tell.
Been suggested to use batik before.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Automating Export of .png files

Postby Moini » Mon Oct 02, 2017 11:07 pm

I thought this could work, but it doesn't:

Bildschirmfoto_2017-10-02_15-06-31.png
Bildschirmfoto_2017-10-02_15-06-31.png (44.09 KiB) Viewed 1685 times


Not sure if it's a bug, or perhaps I'm doing something wrong.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Automating Export of .png files

Postby Moini » Mon Oct 02, 2017 11:08 pm

(had it set to 'Apply to Tag', too. Also tried with dots as decimal separator.)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Automating Export of .png files

Postby Moini » Mon Oct 02, 2017 11:15 pm

Guess it needs to take the namespace into account and to set it separately. Probably not hard to do...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Automating Export of .png files

Postby Moini » Tue Oct 03, 2017 11:06 am

Works now in my version, but wow, there are so many bugs... and Inkscape crashes regularly when you change a number in the fields.
Attachments
Bildschirmfoto_2017-10-03_03-06-06.png
Bildschirmfoto_2017-10-03_03-06-06.png (45.8 KiB) Viewed 1625 times
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Automating Export of .png files

Postby Lazur » Tue Oct 03, 2017 6:22 pm

^Ha!

Nice you could get it to work. However the original post was about altering the rounded parametre and not the randomization. Maybe that would be more stabile.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Automating Export of .png files

Postby Xav » Tue Oct 03, 2017 7:34 pm

Lazur wrote:However the original post was about altering the rounded parametre and not the randomization. Maybe that would be more stabile.


Actually the OP used "rounded" as an example, but went on to say:

alextrosta wrote:I have done this manually, but would like to create other collections (in a similar manner) by manipulating the 'Randomized' parameter.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Automating Export of .png files

Postby Lazur » Tue Oct 03, 2017 10:01 pm

My bad.

If it was indeed for an animation project, the random factor wouldn't necessarily produce a contiuous image sequence.

Anyway, here is a test image for morphing animation with the "rounding" altered:

SVG Image

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Automating Export of .png files

Postby Moini » Wed Oct 04, 2017 1:27 am

It will work for both, the screenshot was just an example. However, randomized will be randomized for every step, and not a step-wise change (although I suspect that Inkscape's 'random' isn't so very randomly here). Fixed a couple more issues with the extension, while I was working on it, too (e.g. it completely ignored the units... ?!?)

What doesn't work so well is varying the number of spikes of a star, as that seems to require changing another parameter in the SVG in unison.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”