[Swfdec] libswfdec/swfdec_image.c
David Schleef
ds at kemper.freedesktop.org
Tue Apr 17 13:29:20 PDT 2007
libswfdec/swfdec_image.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
New commits:
diff-tree 2073f39bc0b0aa90f1f67def9bb3f0c6b68018ae (from 27f1a42be2f4852795a514b6b64681013ae29cfe)
Author: Debian User <ds at gromit.(none)>
Date: Tue Apr 17 13:29:20 2007 -0700
Out-of-range indexes in a colormap appear to be transparent. At least,
255 is transparent. Remove a warning for 255.
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index daabe0e..128506b 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -542,7 +542,12 @@ swfdec_image_colormap_decode (SwfdecImag
for (j = 0; j < image->height; j++) {
for (i = 0; i < image->width; i++) {
c = src[i];
- if (c >= colormap_len) {
+ if (colormap_len < 256 && c == 255) {
+ dest[0] = 0;
+ dest[1] = 0;
+ dest[2] = 0;
+ dest[3] = 0;
+ } else if (c >= colormap_len) {
SWFDEC_ERROR ("colormap index out of range (%d>=%d) (%d,%d)",
c, colormap_len, i, j);
dest[0] = 0;
More information about the Swfdec
mailing list