search for: swfdec_image_create_surface

Displaying 13 results from an estimated 13 matches for "swfdec_image_create_surface".

2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...used format, but it should be good enough for most uses diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 6c2dcae..0cf6502 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -185,15 +185,15 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco } static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data) +swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) { static const cairo_user_data_key_t key; g_assert (image->surface == NULL); image->surface = cairo_image_surface_create_for_data (data, - CAIRO_FORMAT_ARG...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...ec_image.c @@ -168,10 +168,18 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco return SWFDEC_STATUS_OK; } +static gboolean +swfdec_image_has_alpha (SwfdecImage *image) +{ + return image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2 || + image->type == SWFDEC_IMAGE_TYPE_JPEG3; +} + static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) +swfdec_image_create_surface (SwfdecImage *image, guint8 *data) { static const cairo_user_data_key_t key; + gboolean has_alpha = swfdec_image_has_alpha (image); g_assert (image->surface == NULL); @@ -204,7 +212,7 @@ swfdec_image_...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
..._get_buffer (&bits, -1); + alpha_data = lossless (buffer->data, buffer->length, image->width * image->height); + swfdec_buffer_unref (buffer); - merge_alpha (image, image_data, alpha_data); + merge_alpha (image, image->data, alpha_data); g_free (alpha_data); - swfdec_image_create_surface (image, image_data); - SWFDEC_LOG (" width = %d", image->width); SWFDEC_LOG (" height = %d", image->height); } @@@ -356,13 -348,20 +326,12 @@@ swfdec_image_lossless_load (SwfdecImage *image) { int format; - int color_table_size; + guint color_table...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...&key, data, g_free); + cairo_surface_reference (image->surface); } int @@ -551,13 +564,13 @@ swfdec_image_png_load (SwfdecImage *image) SWFDEC_ERROR ("implement loading PNG images"); } -static gboolean -swfdec_image_ensure_loaded (SwfdecImage *image) +cairo_surface_t * +swfdec_image_create_surface (SwfdecImage *image) { if (image->raw_data == NULL) - return FALSE; + return NULL; - if (image->data == NULL) { + if (image->surface == NULL) { switch (image->type) { case SWFDEC_IMAGE_TYPE_JPEG: swfdec_image_jpeg_load (image); @@ -582,60 +595,20 @@ swfdec_im...
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
...te <otte@gnome.org> Date: Tue Feb 6 10:05:45 2007 +0100 DO COMPILE BEFORE CHECKING STUFF IN! sheesh diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 4463228..fc0b1f1 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -657,7 +657,7 @@ swfdec_image_create_surface_transformed for (i = 0; i < n; i++) { ((guint32 *) tdata)[i] = swfdec_color_apply_transform_premultiplied (((guint32 *) sdata)[i], trans); /* optimization: check for alpha channel to speed up compositing */ - has_alpha != tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; + has...
2008 Jun 17
2
[Bug 16395] New: glib abort for "double free or corruption" in jpeg code
...c.so.6(cfree+0x9c)[0xb71fa74c] /usr/lib/libglib-2.0.so.0(g_free+0x31)[0xb74465b1] /usr/local/lib/libswfdec-0.7.so.0[0xb1aeaf76] /usr/local/lib/libswfdec-0.7.so.0[0xb1aeb485] /usr/local/lib/libswfdec-0.7.so.0[0xb1aeb4fe] /usr/local/lib/libswfdec-0.7.so.0[0xb1a95670] /usr/local/lib/libswfdec-0.7.so.0(swfdec_image_create_surface+0x36d)[0xb1a965fd] /usr/local/lib/libswfdec-0.7.so.0(swfdec_image_create_surface_transformed+0x109)[0xb1a96a09] /usr/local/lib/libswfdec-0.7.so.0[0xb1aa7017] /usr/local/lib/libswfdec-0.7.so.0(swfdec_pattern_get_pattern+0x8a)[0xb1aa6e1a] /usr/local/lib/libswfdec-0.7.so.0[0xb1aa735e] /usr/local/lib/l...
2007 Nov 12
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_decoder.c libswfdec/swfdec_decoder.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_image.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_image_decoder.h
...ct, &SWFDEC_MOVIE (walk->data)->extents); } @@ -880,6 +887,20 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr, swfdec_draw_paint (draw, cr, &trans); } + /* if the movie loaded an image, draw it here now */ + if (movie->image) { + cairo_surface_t *surface = swfdec_image_create_surface_transformed (movie->image, + &trans); + if (surface) { + static const cairo_matrix_t matrix = { 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 0, 0, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 0, 0 }; + cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface); + SWFDEC_LOG ("rende...
2007 Jun 08
0
Changes to 'refs/tags/0.4.2'
...action Merge branch 'master' into interpreter missing \n s/SWF_COLOR/SWFDEC_COLOR/ update SwfdecColor format from RGBA to ARGB rework images to be correctly color transformed add swfdec_color_transform_is_identity rename swfdec_image_get_surface* to swfdec_image_create_surface* add debugging message when parsing color transforms export images, too Merge branch 'master' into interpreter that should be == NULL, not != NULL fix memleak Fix refcounting issue Add testing framework for drawing output improve image test...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
..._get_buffer (&bits, -1); + alpha_data = lossless (buffer->data, buffer->length, image->width * image->height); + swfdec_buffer_unref (buffer); - merge_alpha (image, image_data, alpha_data); + merge_alpha (image, image->data, alpha_data); g_free (alpha_data); - swfdec_image_create_surface (image, image_data); - SWFDEC_LOG (" width = %d", image->width); SWFDEC_LOG (" height = %d", image->height); } @@@ -356,13 -348,20 +326,12 @@@ swfdec_image_lossless_load (SwfdecImage *image) { int format; - int color_table_size; + guint color_table...
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
...te <otte@gnome.org> Date: Tue Feb 6 10:05:45 2007 +0100 DO COMPILE BEFORE CHECKING STUFF IN! sheesh diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 4463228..fc0b1f1 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -657,7 +657,7 @@ swfdec_image_create_surface_transformed for (i = 0; i < n; i++) { ((guint32 *) tdata)[i] = swfdec_color_apply_transform_premultiplied (((guint32 *) sdata)[i], trans); /* optimization: check for alpha channel to speed up compositing */ - has_alpha != tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; + has...
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...action Merge branch 'master' into interpreter missing \n s/SWF_COLOR/SWFDEC_COLOR/ update SwfdecColor format from RGBA to ARGB rework images to be correctly color transformed add swfdec_color_transform_is_identity rename swfdec_image_get_surface* to swfdec_image_create_surface* add debugging message when parsing color transforms export images, too Merge branch 'master' into interpreter that should be == NULL, not != NULL fix memleak Fix refcounting issue Add testing framework for drawing output improve image test...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...action Merge branch 'master' into interpreter missing \n s/SWF_COLOR/SWFDEC_COLOR/ update SwfdecColor format from RGBA to ARGB rework images to be correctly color transformed add swfdec_color_transform_is_identity rename swfdec_image_get_surface* to swfdec_image_create_surface* add debugging message when parsing color transforms export images, too Merge branch 'master' into interpreter that should be == NULL, not != NULL fix memleak Fix refcounting issue Add testing framework for drawing output improve image test...
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
..."lossless with alpha"; - case SWFDEC_IMAGE_TYPE_PNG: - return "PNG"; - case SWFDEC_IMAGE_TYPE_UNKNOWN: - default: - g_assert_not_reached (); - return "Unknown"; - } -} - -static void -dump_image (SwfdecImage *image) -{ - cairo_surface_destroy (swfdec_image_create_surface (image)); - g_print (" %s %u x %u\n", get_image_type_name (image->type), - image->width, image->height); -} - -static void -dump_object (gpointer value, gpointer dec) -{ - SwfdecCharacter *c = value; - - g_print ("%d: %s\n", c->id, G_OBJECT_TYPE_NAME (c));...