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:
124876e
)
made palette reduction work for single images, too
author
kramm
<kramm>
Wed, 12 Nov 2008 10:32:10 +0000
(10:32 +0000)
committer
kramm
<kramm>
Wed, 12 Nov 2008 10:32:10 +0000
(10:32 +0000)
lib/devices/render.c
patch
|
blob
|
history
diff --git
a/lib/devices/render.c
b/lib/devices/render.c
index
5c84754
..
410c5f7
100644
(file)
--- a/
lib/devices/render.c
+++ b/
lib/devices/render.c
@@
-808,7
+808,11
@@
int render_result_save(gfxresult_t*r, const char*filename)
}
free(origname);
} else {
- writePNG(filename, (unsigned char*)i->img.data, i->img.width, i->img.height);
+ if(!i->palette) {
+ writePNG(filename, (unsigned char*)i->img.data, i->img.width, i->img.height);
+ } else {
+ writePalettePNG(filename, (unsigned char*)i->img.data, i->img.width, i->img.height);
+ }
}
return 1;
}