#include &lt;stdlib.h&gt;<br>#include &lt;iostream&gt;<br>#include &lt;swfdec/swfdec.h&gt;<br>#include &lt;cairo.h&gt;<br><br>using namespace std;<br><br>void swfdec_player_save (SwfdecPlayer *player, guint width, guint height, const char *filename) {<br>
    cairo_surface_t *surface;<br>    cairo_t *cr;<br><br>    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);<br>    cr = cairo_create (surface);<br>    swfdec_player_render (player, cr);<br>    cairo_destroy (cr);<br>
    cairo_surface_write_to_png (surface, filename);<br>    cairo_surface_destroy (surface);<br>}<br><br>int main(int argc, char *argv[]) {<br>    char *input = argv[1];<br>    char *output = argv[2];<br>    <br>    SwfdecPlayer *player = swfdec_player_new(NULL);<br>
    SwfdecURL *url = swfdec_url_new_from_input(input);<br>    swfdec_player_set_url(player, url);<br>    <br>    swfdec_player_save(player, 300, 300, output);<br><br>    return 0;<br>}<br>