From ec9db1d6af76c053f5e1c746057554e0b0dbcc9b Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Fri, 29 Apr 2005 01:35:52 +0000 Subject: [project @ 2005-04-29 01:35:52 by rjw] Only initialise canvases if we need to. svn path=/import/netsurf/; revision=1699 --- image/mng.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'image/mng.c') 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; } -- cgit v1.2.3