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:
e7f4341
)
fixed handling of alpha palettes in PNG extraction.
author
kramm
<kramm>
Tue, 22 Feb 2005 20:08:43 +0000
(20:08 +0000)
committer
kramm
<kramm>
Tue, 22 Feb 2005 20:08:43 +0000
(20:08 +0000)
src/swfextract.c
patch
|
blob
|
history
diff --git
a/src/swfextract.c
b/src/swfextract.c
index
a4a2ded
..
ee15f62
100644
(file)
--- a/
src/swfextract.c
+++ b/
src/swfextract.c
@@
-830,12
+830,21
@@
void handlelossless(TAG*tag)
png_write_byte(fi,palette[t].b);
}
png_end_chunk(fi);
png_write_byte(fi,palette[t].b);
}
png_end_chunk(fi);
+
+ if(alpha) {
+ /* write alpha palette */
+ png_start_chunk(fi, "tRNS", 256);
+ for(t=0;t<256;t++) {
+ png_write_byte(fi,palette[t].a);
+ }
+ png_end_chunk(fi);
+ }
}
{
int pos2 = 0;
int x,y;
int srcwidth = width * (bpp/8);
}
{
int pos2 = 0;
int x,y;
int srcwidth = width * (bpp/8);
- datalen3 = width*height*4;
+ datalen3 = (width*4+5)*height;
data3 = (U8*)malloc(datalen3);
for(y=0;y<height;y++)
{
data3 = (U8*)malloc(datalen3);
for(y=0;y<height;y++)
{