maltaisn / swf-convert

Utility to convert static SWF files to PDF or SVG
GNU Lesser General Public License v3.0
23 stars 5 forks source link

for swf's sprite #4

Closed skream27 closed 3 years ago

skream27 commented 3 years ago

can we do the same for swf's sprite, maltaisn? i don't have any code information, I don't even know how to run it. can you help?

maltaisn commented 3 years ago

I'm not sure I understand. If you have a .swf file you can convert it to pdf or svg. Follow the instructions in the readme for how to run it.

skream27 commented 3 years ago

the program you made converts the frame of the swf, but I need the one for the sprite of the swf. i'll send you a file, will you examine it? please open with jpexs flash decompiler and click sprites, you'll understand what I mean. file-b.zip

maltaisn commented 3 years ago

Ok I made a change and it seems to work. The tool was made to parse only top-level frames and a single frame in sprites. Other frames in sprites were discarded since this is typically used for animation, not static content. I added an option to create pages for all frames in a sprite.

However there's another issue: your file indicates the frame dimensions to be 20x20 twips (1x1 pixel), so there's virtually nothing getting displayed. Are you aware of where the actual dimensions are set? If not, I can always provide an extra option to override the frame dimensions.

skream27 commented 3 years ago

Maltaisn, thank you very much for all the hard work and effort you put into this project. I would like to opt for the option to change the dimensions manually. Can you send?

maltaisn commented 3 years ago

Here's a pre-release with two new options:

I think I get the correct output with:

java -jar swf-convert.jar pdf file-b.swf -DrecursiveFrames -DframeSize=[8.5,11]

I guessed for the dimensions but it looks right. You tell me if it works for other files if you have any.