goo/TiffWriter.cc | 13 ++++++++++++- goo/TiffWriter.h | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-)
New commits: commit fb5c383bd5be7090fc78380b4bb3244c3316c0cd Author: William Bader <[email protected]> Date: Mon Sep 17 00:03:49 2012 +0200 Make pdftoppm -tiff -overprint work Bug #54896 diff --git a/goo/TiffWriter.cc b/goo/TiffWriter.cc index f63b245..d00f6c4 100644 --- a/goo/TiffWriter.cc +++ b/goo/TiffWriter.cc @@ -4,7 +4,7 @@ // // This file is licensed under the GPLv2 or later // -// Copyright (C) 2010 William Bader <[email protected]> +// Copyright (C) 2010, 2012 William Bader <[email protected]> // //======================================================================== @@ -126,6 +126,12 @@ bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDP photometric = PHOTOMETRIC_RGB; break; + case splashModeCMYK8: + case splashModeDeviceN8: + samplesperpixel = 4; + photometric = PHOTOMETRIC_SEPARATED; + break; + default: fprintf(stderr, "TiffWriter: Mode %d not supported\n", splashMode); return false; @@ -159,6 +165,11 @@ bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDP TIFFSetField(f, TIFFTAG_YRESOLUTION, (double) vDPI); TIFFSetField(f, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); + if (splashMode == splashModeCMYK8 || splashMode == splashModeDeviceN8) { + TIFFSetField(f, TIFFTAG_INKSET, INKSET_CMYK); + TIFFSetField(f, TIFFTAG_NUMBEROFINKS, 4); + } + return true; } diff --git a/goo/TiffWriter.h b/goo/TiffWriter.h index 1f4b5eb..bffd17a 100644 --- a/goo/TiffWriter.h +++ b/goo/TiffWriter.h @@ -4,7 +4,7 @@ // // This file is licensed under the GPLv2 or later // -// Copyright (C) 2010 William Bader <[email protected]> +// Copyright (C) 2010, 2012 William Bader <[email protected]> // Copyright (C) 2011 Albert Astals Cid <[email protected]> // //======================================================================== @@ -38,6 +38,8 @@ class TiffWriter : public ImgWriter bool writePointers(unsigned char **rowPointers, int rowCount); bool writeRow(unsigned char **rowData); + bool supportCMYK() { return true; } + bool close(); private: _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
