diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-01-09 16:54:09 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-01-10 16:06:17 +0100 |
commit | bec33a470ea600599d3ad9df472b815e7b46e824 (patch) | |
tree | 427f1a799d973a541e122c78207aaf76a7a98141 /source/fitz/output-tga.c | |
parent | b70eb93f6936c03d8af52040bbca4d4a7db39079 (diff) | |
download | mupdf-bec33a470ea600599d3ad9df472b815e7b46e824.tar.xz |
Add colorspace type enum and use it instead of hardcoded checks on N.
Diffstat (limited to 'source/fitz/output-tga.c')
-rw-r--r-- | source/fitz/output-tga.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |