X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfbits.c;h=bc1e0f801ad285c6d3d4538a010efef45324e261;hb=a694b731da2eed7c0302a78386f03f8c7ca9869f;hp=f23850363a27899b01706df6d6aadd54a452eb8a;hpb=f240760415f2f9312368cedd845ac3c5eac4c565;p=swftools.git diff --git a/lib/modules/swfbits.c b/lib/modules/swfbits.c index f238503..bc1e0f8 100644 --- a/lib/modules/swfbits.c +++ b/lib/modules/swfbits.c @@ -801,6 +801,8 @@ RGBA *swf_DefineLosslessBitsTagToImage(TAG * tag, int *dwidth, int *dheight) palette[t].b = data[pos++]; if (alpha) { palette[t].a = data[pos++]; + } else { + palette[t].a = 255; } } } @@ -820,7 +822,11 @@ RGBA *swf_DefineLosslessBitsTagToImage(TAG * tag, int *dwidth, int *dheight) } } else { for (x = 0; x < width; x++) { - /* TODO: un-premultiply alpha? */ + /* TODO: premultiply alpha? + dest[pos2].r = (data[pos + 1]*255)/data[pos+0]; + dest[pos2].g = (data[pos + 2]*255)/data[pos+0]; + dest[pos2].b = (data[pos + 3]*255)/data[pos+0]; + */ dest[pos2].r = data[pos + 1]; dest[pos2].g = data[pos + 2]; dest[pos2].b = data[pos + 3];