summaryrefslogtreecommitdiff
path: root/image/jpeg.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-10-04 23:54:42 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-10-04 23:54:42 +0000
commit403f12872d55a71b04287ed828be0c63be19e856 (patch)
tree190dbf327b98bb49831dc609f6c13bd828ded377 /image/jpeg.c
parent7144ce65ebbc7b1cb77d1f6b678a6d2b3c6547d1 (diff)
downloadnetsurf-403f12872d55a71b04287ed828be0c63be19e856.tar.gz
netsurf-403f12872d55a71b04287ed828be0c63be19e856.tar.bz2
[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
Diffstat (limited to 'image/jpeg.c')
-rw-r--r--image/jpeg.c9
1 files changed, 2 insertions, 7 deletions
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);