diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-07-12 21:18:45 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-07-19 19:41:23 +0100 |
commit | d54763bcd644364c19d3a6a12f889127df583e01 (patch) | |
tree | 379843a30fbb263e811ac6cbe3d2a4abe13b6fb3 /source/fitz/output.c | |
parent | d541fc4b9eced1b788377df8c7edfd9b8dea4094 (diff) | |
download | mupdf-d54763bcd644364c19d3a6a12f889127df583e01.tar.xz |
Update band writer (especially PSD) to cope with spots
PSD writer now outputs spot colors. Ensure subtractive
colorspaces are stored with proper polarity. The CMYK
and spot components need to be 255-X in the PSD format
Store PSD format resources using correct Pascal style strings.
Photoshop will fail to open if the the ICC profile resource
name is not in proper format.
(Incorporates fixes from Michael).
Diffstat (limited to 'source/fitz/output.c')
-rw-r--r-- | source/fitz/output.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/fitz/output.c b/source/fitz/output.c index 3240be12..08ee50fe 100644 --- a/source/fitz/output.c +++ b/source/fitz/output.c @@ -392,18 +392,21 @@ fz_band_writer *fz_new_band_writer_of_size(fz_context *ctx, size_t size, fz_outp return writer; } -void fz_write_header(fz_context *ctx, fz_band_writer *writer, int w, int h, int n, int alpha, int xres, int yres, int pagenum, const fz_colorspace *cs) +void fz_write_header(fz_context *ctx, fz_band_writer *writer, int w, int h, int n, int alpha, int xres, int yres, int pagenum, const fz_colorspace *cs, fz_separations *seps) { if (writer == NULL || writer->band == NULL) return; + writer->w = w; writer->h = h; + writer->s = fz_count_active_separations(ctx, seps); writer->n = n; writer->alpha = alpha; writer->xres = xres; writer->yres = yres; writer->pagenum = pagenum; writer->line = 0; + writer->seps = fz_keep_separations(ctx, seps); writer->header(ctx, writer, cs); } @@ -433,5 +436,6 @@ void fz_drop_band_writer(fz_context *ctx, fz_band_writer *writer) return; if (writer->drop != NULL) writer->drop(ctx, writer); + fz_drop_separations(ctx, writer->seps); fz_free(ctx, writer); } |