[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] converting swf to jpeg
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] converting swf to jpeg |
Date: |
Mon, 15 Aug 2005 14:25:11 +0200 |
User-agent: |
Mutt/1.5.6i |
On Sun, Aug 14, 2005 at 08:55:28PM +0200, Michael Hansen wrote:
> Really?! How would one invoking this static swf render engine ?
It's only in the backend so far. There's no frontend (command line
util) for it yet.
The current version can only handle single frames, and still lacks support
for MovieClips and gradients. (And, of course, ActionScript)
If you're adept in C++, you can write a short program to invoke it:
int main() {
SWF swf;
RENDERBUF buf;
int fi = open("input.swf",O_RDONLY|O_BINARY);
swf_ReadSWF(fi,&swf);
int width = (swf.movieSize.xmax - swf.movieSize.xmin) / 20;
int height = (swf.movieSize.ymax - swf.movieSize.ymin) / 20;
swf_Render_Init(&buf, swf.movieSize.xmin / 20, swf.movieSize.ymin / 20,
width, height, 1, 1);
swf_RenderSWF(&buf, &swf);
RGBA* data = swf_Render(&buf);
writePNG("output.png", (unsigned char *)data, width, height);
swf_Render_Delete(&buf);
swf_FreeTags(&swf);
}
Greetings
Matthias