Hi, I am very new to working in Synfig, but I am falling in love with it fast!
My goal: Use Synfig to create small swf files that I can upload to PowToons to enhance my marketing videos. Basically give me custom creative characters that PowToons does not supply.
My work so far: created screen shot of existing character from a “theme pack” and imported the png into Inkscape. Created a doll for character to hold. Exported as png file with transparent background. (A MUST!) Imported the new png into Synfig. Using the new cutting tool, added skeleton, separated the parts I wanted to move, and linked the parts to the co-coordinating bones. Rendered using “.png” setting and got 96 separate png files in sequence with a transparent background. Excellent! At 24fps, the animation is 4sec long. Perfect! Character is holding her doll and playing with it.
Problem: Stitching the .png files together in sequence to play WITH THE TRANSPARENT background.
I use a Mac Mini, OS X Yosemite Version 10.10.5 … I downloaded the SWFTOOL for Mac. I placed the “png2swf.exe” into the folder where all the sequential png files are. Ran this code in my cmd pannel:
png2swf -z -r24 -T20 00*.png
Link to the options list
http://www.swftools.org/png2swf.html
Note: if you have more than 00.png files, such as 0000.png to 0250.png, only the first 100 will be sequenced in the resulting swf. To get around that, use 0*.png.
*NOTE: How to resize batch of pngs all at once: Use ImageMagick… Link to great tutorial: http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/.
In terminal window, navigate to the folder containing my pngs…
In my command line enter:
for file in *.png; do convert $file -resize (enter the dimensions as x) (enter new file name)-$file; done
works great! file “001.png” is now resized and named (newfilename)-001.png
Create swf in terminal window using png2swf line above:
[b]png2swf -z -r24 -T20 00.png[/b]
The resulting swf will be have transparent background, but alpha shows as black. Open free program FFdec https://www.free-decompiler.com/flash/download/ and drage swf into the window. Click on the “others” folder in the file tree for the swf, and select “SetBackgrounColor.” The main window will say “backgroundColor= rgb red:0, green:0, blue:0” … click on this and it will show a black color box. Click on the black color box and it will bring up a palette to choose a color from. Select white. It will now read as “backgroundColor= rgb red:255, green:255, blue:255” … make sure to click “save”. It is now on a transparent background!
Got this animation as a result. They are screen shots of the swf animation in my browsers window.
and the mp4 here:
You can see how the inserted swf animation has a black box around it against the background.
Question: HOW do I tell png2swf to preserve the transparent background for output!?!???
I’m a newbie, so please give an example of the text you would write in the cmd pannel, and possibly a very brief explanation of why it works. I’m really stumped by this problem. Any and all help would be appreciated!