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/pdf/pdf-op-buffer.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/pdf/pdf-op-buffer.c')
-rw-r--r-- | source/pdf/pdf-op-buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/pdf/pdf-op-buffer.c b/source/pdf/pdf-op-buffer.c index 69707843..95edea46 100644 --- a/source/pdf/pdf-op-buffer.c +++ b/source/pdf/pdf-op-buffer.c @@ -599,6 +599,8 @@ pdf_out_BI(fz_context *ctx, pdf_processor *proc, fz_image *img) fz_write_string(ctx, out, "/CS/CMYK\n"); else if (fz_colorspace_is_indexed(ctx, img->colorspace)) fz_write_string(ctx, out, "/CS/I\n"); + else + fz_throw(ctx, FZ_ERROR_GENERIC, "BI operator can only show mask, Gray, RGB, CMYK, or Indexed images"); if (img->interpolate) fz_write_string(ctx, out, "/I true\n"); fz_write_string(ctx, out, "/D["); |