From 38c45fc53471720f9c00cc3a09014879da996ba3 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 24 May 2016 13:50:31 +0100 Subject: Skip alphas for "loaded" JPEGs. --- source/fitz/load-jpeg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source') diff --git a/source/fitz/load-jpeg.c b/source/fitz/load-jpeg.c index 6aac519c..1a155191 100644 --- a/source/fitz/load-jpeg.c +++ b/source/fitz/load-jpeg.c @@ -266,7 +266,7 @@ fz_load_jpeg(fz_context *ctx, unsigned char *rbuf, int rlen) else fz_throw(ctx, FZ_ERROR_GENERIC, "bad number of components in jpeg: %d", cinfo.num_components); - image = fz_new_pixmap(ctx, colorspace, cinfo.output_width, cinfo.output_height, 1); + image = fz_new_pixmap(ctx, colorspace, cinfo.output_width, cinfo.output_height, 0); if (extract_exif_resolution(cinfo.marker_list, &image->xres, &image->yres)) /* XPS prefers EXIF resolution to JFIF density */; @@ -299,7 +299,6 @@ fz_load_jpeg(fz_context *ctx, unsigned char *rbuf, int rlen) { for (k = 0; k < cinfo.output_components; k++) *dp++ = *sp++; - *dp++ = 255; } dp += stride; } -- cgit v1.2.3