Displaying 7 results from an estimated 7 matches for "cairo_surface_write_to_png".
2010 Jan 17
1
screenshot of swf file
...ayer *player, guint width, guint
height, const char *filename) {
cairo_surface_t *surface;
cairo_t *cr;
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width,
height);
cr = cairo_create (surface);
swfdec_player_render (player, cr);
cairo_destroy (cr);
cairo_surface_write_to_png (surface, filename);
cairo_surface_destroy (surface);
}
int main(int argc, char *argv[]) {
char *input = argv[1];
char *output = argv[2];
SwfdecPlayer *player = swfdec_player_new(NULL);
SwfdecURL *url = swfdec_url_new_from_input(input);
swfdec_player_set_url(player, u...
2010 Aug 21
1
R-devel Digest, Vol 90, Issue 20
...I think this is
>> > the easiest route for Donald.
>> >
>> > Alternatively, Donald might look into the X11 graphics driver, where
>> > Cairo is used to write pngs. In particular, the in_do_saveplot function
>> > (src/main/modules/X11/devX11.c) calls cairo_surface_write_to_png, in
>> > order to save a png to file. Cairo also provides the
>> > cairo_surface_write_to_png_stream function, which might be used to send
>> > png data to a memory buffer (i.e. a raw vector). I don't think it would
>> > be too difficult to modify in_do_s...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...TRUE;
dump:
cairo_surface_destroy (image);
if (g_getenv ("SWFDEC_TEST_DUMP")) {
cairo_status_t status;
- char *dump = g_strdup_printf ("%s.dump.png", filename);
+ char *dump;
+
+ dump = g_strdup_printf ("%s.dump.png", filename);
status = cairo_surface_write_to_png (surface, dump);
if (status) {
g_print (" ERROR: failed to dump image to %s: %s\n", dump,
cairo_status_to_string (status));
}
g_free (dump);
+ if (diff) {
+ dump = g_strdup_printf ("%s.diff.png", filename);
+ status = cairo_surface_write_t...
2008 Jan 08
0
4 commits - test/.gitignore test/image test/Makefile.am test/swfdec_test_function.c test/swfdec_test_image.c test/swfdec_test_image.h test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
...ro_surface_destroy (image);
- cairo_surface_destroy (diff);
- return TRUE;
-
-dump:
- cairo_surface_destroy (image);
- if (g_getenv ("SWFDEC_TEST_DUMP")) {
- cairo_status_t status;
- char *dump;
-
- dump = g_strdup_printf ("%s.dump.png", filename);
- status = cairo_surface_write_to_png (surface, dump);
- if (status) {
- g_print (" ERROR: failed to dump image to %s: %s\n", dump,
- cairo_status_to_string (status));
- }
- g_free (dump);
- if (diff) {
- dump = g_strdup_printf ("%s.diff.png", filename);
- status = cairo_surface_write_t...
2007 Feb 06
0
21 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c
...TRUE;
dump:
cairo_surface_destroy (image);
if (g_getenv ("SWFDEC_TEST_DUMP")) {
cairo_status_t status;
- char *dump = g_strdup_printf ("%s.dump.png", filename);
+ char *dump;
+
+ dump = g_strdup_printf ("%s.dump.png", filename);
status = cairo_surface_write_to_png (surface, dump);
if (status) {
g_print (" ERROR: failed to dump image to %s: %s\n", dump,
cairo_status_to_string (status));
}
g_free (dump);
+ if (diff) {
+ dump = g_strdup_printf ("%s.diff.png", filename);
+ status = cairo_surface_write_t...
2010 Jul 20
1
Building rattle on Solaris 10u7 X86
...h
"cairoDevice.c", line 799: warning: implicit function declaration:
cairo_paint
"cairoDevice.c", line 801: improper member use: drawing
"cairoDevice.c", line 802: improper member use: drawing
"cairoDevice.c", line 813: warning: implicit function declaration:
cairo_surface_write_to_png
"cairoDevice.c", line 813: undefined struct/union member: surface
"cairoDevice.c", line 830: improper member use: window
"cairoDevice.c", line 839: improper member use: window
"cairoDevice.c", line 860: undefined struct/union member: cr
"cairoDevice.c&qu...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
- }
- return surface;
-}
-
-static gboolean
-surface_destroy_for_type (cairo_surface_t *surface, const char *filename)
-{
- if (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE) {
- cairo_status_t status = cairo_surface_write_to_png (surface, filename);
- if (status != CAIRO_STATUS_SUCCESS) {
- g_printerr ("Error saving file: %s\n", cairo_status_to_string (status));
- cairo_surface_destroy (surface);
- return FALSE;
- }
- }
- cairo_surface_destroy (surface);
- return TRUE;
-}
-
-static gboolea...