summaryrefslogtreecommitdiff
path: root/source/fitz/load-tiff.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/load-tiff.c')
-rw-r--r--source/fitz/load-tiff.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index 117b9816..7262b23e 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -1286,19 +1286,7 @@ fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, size_t len, int subim
/* 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, 1);
-
- rgb->xres = image->xres;
- rgb->yres = image->yres;
-
- fz_try(ctx)
- fz_convert_pixmap(ctx, rgb, image);
- fz_catch(ctx)
- {
- fz_drop_pixmap(ctx, rgb);
- fz_rethrow(ctx);
- }
-
+ fz_pixmap *rgb = fz_convert_pixmap(ctx, image, fz_device_rgb(ctx), 1);
fz_drop_pixmap(ctx, image);
image = rgb;
}