X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fmodules%2Fswfbits.c;h=c2dcf254e14f7be3e25f1c8ac746b538d206076c;hp=1e32cf2ec7e17c5929b80a2dde9e43bdb976d654;hb=c3cacee02d5a26355bccc9865dc213e47eeb5370;hpb=3828ad1eb96fa48bcb289c566b221a7bbd5ea558 diff --git a/lib/modules/swfbits.c b/lib/modules/swfbits.c index 1e32cf2..c2dcf25 100644 --- a/lib/modules/swfbits.c +++ b/lib/modules/swfbits.c @@ -887,6 +887,7 @@ void swf_SetLosslessImage(TAG*tag, RGBA*data, int width, int height) tag->id = ST_DEFINEBITSLOSSLESS; } else { tag->id = ST_DEFINEBITSLOSSLESS2; + /* FIXME: we're destroying the callers data here */ swf_PreMultiplyAlpha(data, width, height); } num = swf_ImageGetNumberOfPaletteEntries(data, width, height, 0); @@ -1169,7 +1170,8 @@ TAG* swf_AddImage(TAG*tag, int bitid, RGBA*mem, int width, int height, int quali #endif #if defined(HAVE_JPEGLIB) - /* try jpeg image */ + /* try jpeg image. Notice that if (and only if) we tried the lossless compression + above, the data will now be premultiplied with alpha. */ if(has_alpha) { tag2 = swf_InsertTag(0, ST_DEFINEBITSJPEG3); swf_SetU16(tag2, bitid);