Displaying 9 results from an estimated 9 matches for "merge_alpha".
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 7dcb879..bff9fa6 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -33,6 +33,7 @@
#include "swfdec_debug.h"
#include "swfdec_swf_decoder.h"
+static const cairo_user_data_key_t key;
static void merge_alpha (SwfdecImage * image, unsigned char *image_data,
unsigned char *alpha);
@@ -50,10 +51,7 @@ swfdec_image_unload (SwfdecCached *cached)
if (image->surface) {
cairo_surface_destroy (image->surface);
image->surface = NULL;
- } else if (image->data) {
- g_free (image-&g...
2008 Nov 23
1
[Bug 18669] New: copyPixels fails if alphaBitmap/ alphaPoint arguments are null
...Component: library
AssignedTo: swfdec at lists.freedesktop.org
ReportedBy: mental at rydia.net
QAContact: swfdec at lists.freedesktop.org
copyPixels should treat the following as if a solid alpha mask had been
provided:
bitmapData.copyPixels(src, rect, pt, null, null, merge_alpha);
Currently, however, swfdec implements it as a noop.
A branch which extends the copyPixels test to catch this bug, and additionally
fixes it, is available from this repository:
git://github.com/mental/swfdec.git
The branch name is copyPixels-alpha-nomask
--
Configure bugmail: http://bugs.f...
2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...);
- swfdec_image_create_surface (image, image_data);
+ swfdec_image_create_surface (image, image_data, FALSE);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -339,7 +339,7 @@ swfdec_image_jpeg3_load (SwfdecImage *im
merge_alpha (image, image_data, alpha_data);
g_free (alpha_data);
- swfdec_image_create_surface (image, image_data);
+ swfdec_image_create_surface (image, image_data, TRUE);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -464,...
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
...;
- bits.ptr += jpeg_length;
-
- alpha_data = lossless (bits.ptr, bits.end - bits.ptr, &len);
+ buffer = swfdec_bits_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);
}
@@@...
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
..._rgb_decoder_get_image (dec, &image->data,
&image->rowstride, &image->width, &image->height);
jpeg_rgb_decoder_free (dec);
@@ -336,11 +320,9 @@ swfdec_image_jpeg3_load (SwfdecImage *im
alpha_data = lossless (bits.ptr, bits.end - bits.ptr, &len);
- 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, TRUE);
-
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
}
@@ -3...
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
...);
- swfdec_image_create_surface (image, image_data, FALSE);
+ swfdec_image_create_surface (image, image_data);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -317,7 +325,7 @@ swfdec_image_jpeg3_load (SwfdecImage *im
merge_alpha (image, image_data, alpha_data);
g_free (alpha_data);
- swfdec_image_create_surface (image, image_data, TRUE);
+ swfdec_image_create_surface (image, image_data);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -487,...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...ree (dec);
- bits.ptr += jpeg_length;
-
- alpha_data = lossless (bits.ptr, bits.end - bits.ptr, &len);
+ buffer = swfdec_bits_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);
g_free (alpha_data);
@@ -372,19 +350,12 @@ swfdec_image_lossless_load (SwfdecImage
int format;
int color_table_size;
unsigned char *ptr;
- int len;
unsigned char *endptr;
SwfdecBits bits;
unsigned char *image_data = NULL;
int have_alpha = (...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...&image->rowstride, &image->width, &image->height);
jpeg_rgb_decoder_free (dec);
- buffer = swfdec_bits_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);
- g_free (alpha_data);
+ buffer = swfdec_bits_decompress (&bits, -1, image->width * image->height);
+ if (buffer) {
+ merge_alpha (image, image->data, buffer->data);
+ swfdec_buffer_unref (buffer);
+ } else {
+ SWFDEC_WARNING ("...
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
...;
- bits.ptr += jpeg_length;
-
- alpha_data = lossless (bits.ptr, bits.end - bits.ptr, &len);
+ buffer = swfdec_bits_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);
}
@@@...