Displaying 8 results from an estimated 8 matches for "have_alpha".
Did you mean:
has_alpha
2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...wfdec_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,6 +464,7 @@ swfdec_image_lossless_load (SwfdecImage
if (have_alpha) {
SWFDEC_INFO("16bit images aren't allowed to have alpha, ignoring");
+ have_alpha = FALSE;
}
image_data = g_malloc (4 * image->width * image->height);
@@ -513,7 +514,7 @@ swfdec_image_lossless_load (SwfdecImage
}
}
- swfdec_image_create_surf...
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);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -487,7 +495,7 @@ swfdec_image_lossless_load (SwfdecImage
#endif
}
- swfdec_image_create_surface (image, image_data, have_alpha);
+ swfdec_image_create_surface (image, image_data);
}
int
@@ -611,11 +619,7 @@ swfdec_image_get_surface_for_target (Swf
/* FIXME: we might want to create multiple surfaces here if there's multiple
* live rendering sources. Right now, this is the quick fix, that transforms
* the...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...ta + y * image->width * 4;
for (x = 0; x < image->width; x++) {
p[SWFDEC_COLOR_INDEX_ALPHA] = *alpha;
p += 4;
@@ -317,6 +325,7 @@ swfdec_image_lossless_load (SwfdecImage *image)
guint color_table_size;
unsigned char *ptr;
SwfdecBits bits;
+ guint8 *data;
int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2);
swfdec_bits_init (&bits, image->raw_data);
@@ -348,15 +357,14 @@ swfdec_image_lossless_load (SwfdecImage *image)
guint i;
guint rowstride = (image->width + 3) & ~3;
- image->data = g_malloc (4 * image->width...
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
...height);
}
@@@ -356,13 -348,20 +326,12 @@@
swfdec_image_lossless_load (SwfdecImage *image)
{
int format;
- int color_table_size;
+ guint color_table_size;
unsigned char *ptr;
- int len;
- unsigned char *endptr;
SwfdecBits bits;
- unsigned char *image_data = NULL;
int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2);
- bits.buffer = image->raw_data;
- bits.ptr = image->raw_data->data;
- bits.idx = 0;
- bits.end = bits.ptr + image->raw_data->length;
- endptr = bits.ptr + bits.buffer->length;
-
- bits.ptr += 2;
+ swfdec_bits_in...
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
...p[3] = *alpha;
-#else
- p[0] = *alpha;
-#endif
+ p[SWFDEC_COLOR_INDEX_ALPHA] = *alpha;
p += 4;
alpha++;
}
@@ -375,7 +353,6 @@ swfdec_image_lossless_load (SwfdecImage
int len;
unsigned char *endptr;
SwfdecBits bits;
- unsigned char *image_data = NULL;
int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2);
bits.buffer = image->raw_data;
@@ -414,7 +391,7 @@ swfdec_image_lossless_load (SwfdecImage
unsigned char *indexed_data;
int i;
- image_data = g_malloc (4 * image->width * image->height);
+ image->data = g_malloc...
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
...mage->height);
if (format == 3) {
+ SwfdecBuffer *buffer;
unsigned char *indexed_data;
guint i;
unsigned int rowstride = (image->width + 3) & ~3;
@@ -363,8 +323,13 @@ swfdec_image_lossless_load (SwfdecImage
image->rowstride = image->width * 4;
if (have_alpha) {
- ptr = lossless (bits.ptr, bits.end - bits.ptr,
- color_table_size * 4 + rowstride * image->height);
+ buffer = swfdec_bits_decompress (&bits, -1, color_table_size * 4 + rowstride * image->height);
+ if (buffer == NULL) {
+ SWFDEC_ERROR ("failed to decompress da...
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
...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 = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2);
- bits.buffer = image->raw_data;
- bits.ptr = image->raw_data->data;
- bits.idx = 0;
- bits.end = bits.ptr + image->raw_data->length;
- endptr = bits.ptr + bits.buffer->length;
-
- bits.ptr += 2;
+ swfdec_bits_init (&...
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
...height);
}
@@@ -356,13 -348,20 +326,12 @@@
swfdec_image_lossless_load (SwfdecImage *image)
{
int format;
- int color_table_size;
+ guint color_table_size;
unsigned char *ptr;
- int len;
- unsigned char *endptr;
SwfdecBits bits;
- unsigned char *image_data = NULL;
int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2);
- bits.buffer = image->raw_data;
- bits.ptr = image->raw_data->data;
- bits.idx = 0;
- bits.end = bits.ptr + image->raw_data->length;
- endptr = bits.ptr + bits.buffer->length;
-
- bits.ptr += 2;
+ swfdec_bits_in...