summaryrefslogtreecommitdiff
path: root/image/mng.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-04-29 01:35:52 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-04-29 01:35:52 +0000
commitec9db1d6af76c053f5e1c746057554e0b0dbcc9b (patch)
treeaee18fe5928493c31f36d99a609fac8052b66289 /image/mng.c
parent683892f9db54d0bdc2380dba12682df4f282b4b5 (diff)
downloadnetsurf-ec9db1d6af76c053f5e1c746057554e0b0dbcc9b.tar.gz
netsurf-ec9db1d6af76c053f5e1c746057554e0b0dbcc9b.tar.bz2
[project @ 2005-04-29 01:35:52 by rjw]
Only initialise canvases if we need to. svn path=/import/netsurf/; revision=1699
Diffstat (limited to 'image/mng.c')
-rw-r--r--image/mng.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/image/mng.c b/image/mng.c
index c19873283..fadd6a3af 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -188,7 +188,7 @@ mng_bool nsmng_processheader(mng_handle mng, mng_uint32 width, mng_uint32 height
LOG(("processing header (%p) %d, %d", c, width, height));
- c->bitmap = bitmap_create(width, height);
+ c->bitmap = bitmap_create(width, height, false);
if (!c->bitmap) {
msg_data.error = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
@@ -297,6 +297,9 @@ bool nsmng_convert(struct content *c, int width, int height) {
/* Optimise the plotting of JNG/PNGs
*/
c->data.mng.opaque_test_pending = (c->type == CONTENT_PNG) || (c->type == CONTENT_JNG);
+ if (c->data.mng.opaque_test_pending)
+ bitmap_set_opaque(c->bitmap, false);
+
return true;
}