From e815e64406e574a75a33e057f954422d56ade314 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 16 Oct 2018 15:01:03 +0200 Subject: Guard loading embedded ICC profiles in images with FZ_ENABLE_ICC. Stops all the extra errors and warnings about missing ICC support. --- source/fitz/load-png.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/fitz/load-png.c') diff --git a/source/fitz/load-png.c b/source/fitz/load-png.c index fbda9035..7d2201ee 100644 --- a/source/fitz/load-png.c +++ b/source/fitz/load-png.c @@ -344,6 +344,7 @@ png_read_trns(fz_context *ctx, struct info *info, const unsigned char *p, unsign static void png_read_icc(fz_context *ctx, struct info *info, const unsigned char *p, unsigned int size) { +#if FZ_ENABLE_ICC fz_stream *mstm = NULL, *zstm = NULL; fz_colorspace *cs = NULL; size_t m = fz_mini(80, size); @@ -373,6 +374,7 @@ png_read_icc(fz_context *ctx, struct info *info, const unsigned char *p, unsigne } fz_catch(ctx) fz_warn(ctx, "cannot read embedded ICC profile"); +#endif } static void -- cgit v1.2.3