From 403f12872d55a71b04287ed828be0c63be19e856 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Mon, 4 Oct 2004 23:54:42 +0000 Subject: [project @ 2004-10-04 23:54:42 by rjw] Moved GIF file reading to image/, optimisation of plotting for GIFs, JNGs, PNGs and JPEGs, initial work for toolbar customisation. Possibly some other things too. svn path=/import/netsurf/; revision=1301 --- image/jpeg.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'image/jpeg.c') diff --git a/image/jpeg.c b/image/jpeg.c index 47a8f4b5e..01c075d4b 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -102,6 +102,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) warn_user("NoMemory", 0); return false; } + bitmap_set_opaque(bitmap, true); pixels = bitmap_get_buffer(bitmap); rowstride = bitmap_get_rowstride(bitmap); @@ -120,13 +121,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) scanlines[0][i * 4 + 0] = r; scanlines[0][i * 4 + 1] = g; scanlines[0][i * 4 + 2] = b; - scanlines[0][i * 4 + 3] = 0xff; - } -#else - /* make fully opaque for alpha plotting - * (is there a better way?) */ - for (int i = width - 1; 0 <= i; i--) { - scanlines[0][i * 4 + 3] = 0xff; +/* scanlines[0][i * 4 + 3] = 0xff; */ } #endif } while (cinfo.output_scanline != cinfo.output_height); -- cgit v1.2.3