From bec33a470ea600599d3ad9df472b815e7b46e824 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 9 Jan 2018 16:54:09 +0100 Subject: Add colorspace type enum and use it instead of hardcoded checks on N. --- source/fitz/output-tga.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/fitz/output-tga.c') diff --git a/source/fitz/output-tga.c b/source/fitz/output-tga.c index 44b9ed88..51ebe5db 100644 --- a/source/fitz/output-tga.c +++ b/source/fitz/output-tga.c @@ -74,8 +74,7 @@ fz_save_pixmap_as_tga(fz_context *ctx, fz_pixmap *pixmap, const char *filename) void fz_write_pixmap_as_tga(fz_context *ctx, fz_output *out, fz_pixmap *pixmap) { - fz_band_writer *writer = fz_new_tga_band_writer(ctx, out, pixmap->colorspace == fz_device_bgr(ctx)); - + fz_band_writer *writer = fz_new_tga_band_writer(ctx, out, fz_colorspace_is_bgr(ctx, pixmap->colorspace)); fz_try(ctx) { fz_write_header(ctx, writer, pixmap->w, pixmap->h, pixmap->n, pixmap->alpha, pixmap->xres, pixmap->yres, 0, pixmap->colorspace, pixmap->seps); -- cgit v1.2.3