git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50d805e
)
the flash player expects us to set *all* components to 0 if a color
author
kramm
<kramm>
Mon, 1 May 2006 08:29:55 +0000
(08:29 +0000)
committer
kramm
<kramm>
Mon, 1 May 2006 08:29:55 +0000
(08:29 +0000)
is fully transparent
src/png2swf.c
patch
|
blob
|
history
diff --git
a/src/png2swf.c
b/src/png2swf.c
index
9980e5a
..
0d7e1a6
100644
(file)
--- a/
src/png2swf.c
+++ b/
src/png2swf.c
@@
-76,7
+76,7
@@
TAG *MovieStart(SWF * swf, float framerate, int dx, int dy)
t = swf->firstTag = swf_InsertTag(NULL, ST_SETBACKGROUNDCOLOR);
rgb.r = rgb.g = rgb.b = rgb.a = 0x00;
t = swf->firstTag = swf_InsertTag(NULL, ST_SETBACKGROUNDCOLOR);
rgb.r = rgb.g = rgb.b = rgb.a = 0x00;
- rgb.g = 0xff; //<--- handy for testing alpha conversion
+ //rgb.g = 0xff; //<--- handy for testing alpha conversion
swf_SetRGB(t, &rgb);
return t;
swf_SetRGB(t, &rgb);
return t;
@@
-667,8
+667,12
@@
TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id)
if(hasalphacolor) {
if(rgba[i].r == alphacolor[0] &&
rgba[i].g == alphacolor[1] &&
if(hasalphacolor) {
if(rgba[i].r == alphacolor[0] &&
rgba[i].g == alphacolor[1] &&
- rgba[i].b == alphacolor[2])
+ rgba[i].b == alphacolor[2]) {
+ rgba[i].r = 0;
+ rgba[i].g = 0;
+ rgba[i].b = 0;
rgba[i].a = 0;
rgba[i].a = 0;
+ }
}
}
} else {
}
}
} else {
@@
-681,8
+685,12
@@
TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id)
rgba[i].b = i*mult;
rgba[i].a = 255;
if(hasalphacolor) {
rgba[i].b = i*mult;
rgba[i].a = 255;
if(hasalphacolor) {
- if(rgba[i].r == alphacolor[0])
+ if(rgba[i].r == alphacolor[0]) {
+ rgba[i].r = 0;
+ rgba[i].g = 0;
+ rgba[i].b = 0;
rgba[i].a = 0;
rgba[i].a = 0;
+ }
}
}
}
}
}
}