CMakeLists.txt | 4 ++++ config.h.cmake | 3 +++ configure.ac | 7 +++++++ poppler/SplashOutputDev.cc | 4 ++-- qt4/src/poppler-document.cc | 3 ++- qt4/src/poppler-page.cc | 4 ++-- qt5/src/poppler-document.cc | 3 ++- qt5/src/poppler-page.cc | 4 ++-- splash/Splash.cc | 2 +- splash/SplashBitmap.cc | 4 ++-- 10 files changed, 27 insertions(+), 11 deletions(-)
New commits: commit 2ed8465074c4fc2c88f745b29bdae92410751327 Author: William Bader <[email protected]> Date: Wed Jul 15 00:07:48 2015 +0200 Allow configuring SPLASH_CMYK support from cmake/configure Bug #90795 diff --git a/CMakeLists.txt b/CMakeLists.txt index b143505..bfd374c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ set(ENABLE_LIBOPENJPEG "auto" CACHE STRING "Use libopenjpeg for JPX streams. Pos set(ENABLE_CMS "auto" CACHE STRING "Use color management system. Possible values: auto, lcms1, lcms2. 'auto' prefers lcms2 over lcms1 if both are available. Unset to disable color management system.") option(ENABLE_LIBCURL "Build libcurl based HTTP support." OFF) option(ENABLE_ZLIB "Build with zlib (not totally safe)." OFF) +option(SPLASH_CMYK "Include support for CMYK rasterization." OFF) option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF) option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF) if(WIN32) @@ -703,6 +704,9 @@ endif(ENABLE_CPP) message("Building Poppler with support for:") show_end_message("font configuration" ${font_configuration}) show_end_message_yesno("splash output" ENABLE_SPLASH) +if(SPLASH_CMYK) + message(" with CMYK support") +endif() show_end_message_yesno("cairo output" CAIRO_FOUND) show_end_message_yesno("qt4 wrapper" QT4_FOUND) show_end_message_yesno("qt5 wrapper" QT5_FOUND) diff --git a/config.h.cmake b/config.h.cmake index 8ed1c92..400b16b 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -174,6 +174,9 @@ /* Support for curl based doc builder is compiled in. */ #cmakedefine POPPLER_HAS_CURL_SUPPORT 1 +/* Include support for CMYK rasterization */ +#cmakedefine SPLASH_CMYK 1 + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/configure.ac b/configure.ac index 5e7222a..308715a 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,10 @@ AC_ARG_ENABLE(fixedpoint, [ --enable-fixedpoint use fixed point (instead of double precision) arithmetic in the Splash backend], AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend])) +AC_ARG_ENABLE(cmyk, +[ --enable-cmyk Include support for CMYK rasterization], +AC_DEFINE(SPLASH_CMYK, [1], [Include support for CMYK rasterization])) + dnl Relocation support AC_ARG_ENABLE(relocatable, AC_HELP_STRING([--disable-relocatable], @@ -938,6 +942,9 @@ echo "" echo "Building poppler with support for:" echo " font configuration: $with_font_configuration" echo " splash output: $enable_splash_output" +if test x$enable_cmyk = xyes;then + echo " with CMYK support" +fi echo " cairo output: $use_cairo" echo " qt4 wrapper: $enable_poppler_qt4" echo " qt5 wrapper: $enable_poppler_qt5" diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 97ed1c1..9ca756e 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -888,7 +888,7 @@ static void setSat(Guchar rIn, Guchar gIn, Guchar bIn, int sat, static void splashOutBlendHue(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { Guchar r0, g0, b0; -#ifdef SPLASH_CMYK +#if SPLASH_CMYK Guchar r1, g1, b1; int i; SplashColor src2, dest2; @@ -938,7 +938,7 @@ static void splashOutBlendSaturation(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { Guchar r0, g0, b0; -#ifdef SPLASH_CMYK +#if SPLASH_CMYK Guchar r1, g1, b1; int i; SplashColor src2, dest2; diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc index a1b0b11..e1266e8 100644 --- a/qt4/src/poppler-document.cc +++ b/qt4/src/poppler-document.cc @@ -8,6 +8,7 @@ * Copyright (C) 2012, 2013 Thomas Freitag <[email protected]> * Copyright (C) 2012 Fabio D'Urso <[email protected]> * Copyright (C) 2014 Adam Reichold <[email protected]> + * Copyright (C) 2015 William Bader <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -691,7 +692,7 @@ namespace Poppler { } bool isOverprintPreviewAvailable() { -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK return true; #else return false; diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc index 979b9ef..292f960 100644 --- a/qt4/src/poppler-page.cc +++ b/qt4/src/poppler-page.cc @@ -295,7 +295,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, #if defined(HAVE_SPLASH) SplashColor bgColor; GBool overprintPreview = gFalse; -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK overprintPreview = m_page->parentDoc->m_hints & Document::OverprintPreview ? gTrue : gFalse; if (overprintPreview) { @@ -332,7 +332,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, const bool ignorePaperColor = m_page->parentDoc->m_hints & Document::IgnorePaperColor; if (ignorePaperColor) colorMode = splashModeXBGR8; -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK if (overprintPreview) colorMode = splashModeDeviceN8; #endif diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc index 21f0633..d5d9a6d 100644 --- a/qt5/src/poppler-document.cc +++ b/qt5/src/poppler-document.cc @@ -8,6 +8,7 @@ * Copyright (C) 2012, 2013 Thomas Freitag <[email protected]> * Copyright (C) 2012 Fabio D'Urso <[email protected]> * Copyright (C) 2014 Adam Reichold <[email protected]> + * Copyright (C) 2015 William Bader <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -672,7 +673,7 @@ namespace Poppler { } bool isOverprintPreviewAvailable() { -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK return true; #else return false; diff --git a/qt5/src/poppler-page.cc b/qt5/src/poppler-page.cc index 2015329..8e071c1 100644 --- a/qt5/src/poppler-page.cc +++ b/qt5/src/poppler-page.cc @@ -295,7 +295,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, #if defined(HAVE_SPLASH) SplashColor bgColor; GBool overprintPreview = gFalse; -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK overprintPreview = m_page->parentDoc->m_hints & Document::OverprintPreview ? gTrue : gFalse; if (overprintPreview) { @@ -332,7 +332,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, const bool ignorePaperColor = m_page->parentDoc->m_hints & Document::IgnorePaperColor; if (ignorePaperColor) colorMode = splashModeXBGR8; -#if defined(SPLASH_CMYK) +#if SPLASH_CMYK if (overprintPreview) colorMode = splashModeDeviceN8; #endif diff --git a/splash/Splash.cc b/splash/Splash.cc index 276cc8f..e07fa06 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -605,7 +605,7 @@ void Splash::pipeRun(SplashPipe *pipe) { //----- blend function if (state->blendFunc) { -#ifdef SPLASH_CMYK +#if SPLASH_CMYK if (bitmap->mode == splashModeDeviceN8) { for (int k = 4; k < 4 + SPOT_NCOMPS; k++) { cBlend[k] = 0; diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc index 9830a9a..c905c97 100644 --- a/splash/SplashBitmap.cc +++ b/splash/SplashBitmap.cc @@ -18,7 +18,7 @@ // Copyright (C) 2010, 2012 Adrian Johnson <[email protected]> // Copyright (C) 2010 Harry Roberts <[email protected]> // Copyright (C) 2010 Christian Feuersänger <[email protected]> -// Copyright (C) 2010 William Bader <[email protected]> +// Copyright (C) 2010, 2015 William Bader <[email protected]> // Copyright (C) 2011-2013 Thomas Freitag <[email protected]> // Copyright (C) 2012 Anthony Wesley <[email protected]> // Copyright (C) 2015 Adam Reichold <[email protected]> @@ -362,7 +362,7 @@ SplashError SplashBitmap::writeImgFile(SplashImageFileFormat format, FILE *f, in #endif #ifdef ENABLE_LIBJPEG - #ifdef SPLASH_CMYK + #if SPLASH_CMYK case splashFormatJpegCMYK: writer = new JpegWriter(JpegWriter::CMYK); break;
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
