diff options
Diffstat (limited to 'image/jpeg.c')
-rw-r--r-- | image/jpeg.c | 9 |
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); |