diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-05-23 17:45:21 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-05-24 12:48:35 +0100 |
commit | d0b78f4166a1503ce522944002b3aab035724cd9 (patch) | |
tree | b8c680dc401db56a28be1110759219c7c175dd8d /source/fitz/load-tiff.c | |
parent | 841952db71d6541a2e98fd4d1d49dede284b2cf8 (diff) | |
download | mupdf-d0b78f4166a1503ce522944002b3aab035724cd9.tar.xz |
fz_pixmap revamp: add stride and make alpha optional
fz_pixmaps now have an explicit stride value. By default no change
from before, but code all copes with extra gaps at the end of the
line.
The alpha data in fz_pixmaps is no longer compulsory.
mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw).
Update halftone code to not expect alpha plane.
Update PNG writing to cope with alpha less input.
Also hide repeated params within the png output context.
ARM code needs updating.
Diffstat (limited to 'source/fitz/load-tiff.c')
-rw-r--r-- | source/fitz/load-tiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index 2002c61a..f7661a8d 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -849,7 +849,7 @@ fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, int len, int subimage fz_swap_tiff_byte_order(tiff.samples, tiff.imagewidth * tiff.imagelength * tiff.samplesperpixel); /* Expand into fz_pixmap struct */ - image = fz_new_pixmap(ctx, tiff.colorspace, tiff.imagewidth, tiff.imagelength); + image = fz_new_pixmap(ctx, tiff.colorspace, tiff.imagewidth, tiff.imagelength, 1); image->xres = tiff.xresolution; image->yres = tiff.yresolution; @@ -861,7 +861,7 @@ fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, int len, int subimage /* CMYK is a subtractive colorspace, we want additive for premul alpha */ if (image->n == 5) { - fz_pixmap *rgb = fz_new_pixmap(ctx, fz_device_rgb(ctx), image->w, image->h); + fz_pixmap *rgb = fz_new_pixmap(ctx, fz_device_rgb(ctx), image->w, image->h, 1); fz_convert_pixmap(ctx, rgb, image); rgb->xres = image->xres; rgb->yres = image->yres; |