[Openicc] cups-filters
Joseph Simon
jsimon383 at gmail.com
Fri Aug 8 16:32:29 PDT 2014
Till,
The lcms naming issue should be patched up in rev. 7250.
Joe
On Fri, Aug 8, 2014 at 3:27 PM, Till Kamppeter <till.kamppeter at gmail.com>
wrote:
> Thank you for the commit, but rastertopdf does not build for me. See below.
>
> Till
>
> ----------
>
>
> CXX rastertopdf-rastertopdf.o
> filter/rastertopdf.cpp:85:25: warning: anonymous variadic macros were
> introduced in C99 [-Wvariadic-macros]
> #define dprintf(format, ...) fprintf(stderr, "DEBUG2: (" PROGRAM ") "
> format, __VA_ARGS__)
> ^
> filter/rastertopdf.cpp:87:25: warning: anonymous variadic macros were
> introduced in C99 [-Wvariadic-macros]
> #define iprintf(format, ...) fprintf(stderr, "INFO: (" PROGRAM ") "
> format, __VA_ARGS__)
> ^
> filter/rastertopdf.cpp: In function ‘QPDFObjectHandle
> embedIccProfile(QPDF&)’:
> filter/rastertopdf.cpp:187:3: error: ‘icColorSpaceSignature’ was not
> declared in this scope
> icColorSpaceSignature css = cmsGetColorSpace(colorProfile);
> ^
> filter/rastertopdf.cpp:187:25: error: expected ‘;’ before ‘css’
> icColorSpaceSignature css = cmsGetColorSpace(colorProfile);
> ^
> filter/rastertopdf.cpp:190:10: error: ‘css’ was not declared in this scope
> switch(css){
> ^
> filter/rastertopdf.cpp:191:10: error: ‘icSigGrayData’ was not declared
> in this scope
> case icSigGrayData:
> ^
> filter/rastertopdf.cpp:195:10: error: ‘icSigRgbData’ was not declared in
> this scope
> case icSigRgbData:
> ^
> filter/rastertopdf.cpp:199:10: error: ‘icSigCmykData’ was not declared
> in this scope
> case icSigCmykData:
> ^
> filter/rastertopdf.cpp:211:57: error: ‘_cmsSaveProfileToMem’ was not
> declared in this scope
> _cmsSaveProfileToMem(colorProfile, NULL, &profile_size);
> ^
> filter/rastertopdf.cpp:212:34: warning: ISO C++ forbids variable length
> array ‘buff’ [-Wvla]
> unsigned char buff[profile_size];
> ^
> filter/rastertopdf.cpp: In function ‘QPDFObjectHandle makeImage(QPDF&,
> PointerHolder<Buffer>, unsigned int, unsigned int, cups_cspace_t,
> unsigned int)’:
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_W’ not handled in switch [-Wswitch]
> switch(cs) {
> ^
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_RGBA’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_CMY’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_YMC’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_YMCK’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_KCMY’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_KCMYcm’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_GMCK’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_GMCS’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_WHITE’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_GOLD’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_SILVER’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_CIEXYZ’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_CIELab’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_RGBW’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_SW’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC1’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC2’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC3’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC4’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC5’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC6’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC7’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC8’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICC9’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCA’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCB’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCC’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCD’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCE’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_ICCF’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE1’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE2’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE3’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE4’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE5’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE6’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE7’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE8’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICE9’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICEA’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICEB’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICEC’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICED’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICEE’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp:358:15: warning: enumeration value
> ‘CUPS_CSPACE_DEVICEF’ not handled in switch [-Wswitch]
> filter/rastertopdf.cpp: In function ‘int convert_raster(cups_raster_t*,
> unsigned int, unsigned int, int, int, pdf_info*)’:
> filter/rastertopdf.cpp:495:12: warning: unused variable ‘pixels’
> [-Wunused-variable]
> int i, pixels;
> ^
> filter/rastertopdf.cpp: In function ‘int main(int, char**)’:
> filter/rastertopdf.cpp:682:18: warning: unused variable ‘val’
> [-Wunused-variable]
> const char *val; /* Option value */
> ^
> filter/rastertopdf.cpp: At global scope:
> filter/rastertopdf.cpp:555:21: warning: ‘unsigned int
> getCMSColorSpaceType(cmsColorSpaceSignature)’ defined but not used
> [-Wunused-function]
> static unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs)
> ^
> make[1]: *** [rastertopdf-rastertopdf.o] Error 1
> make[1]: Leaving directory `/home/till/printing/cups/bzr/y'
> make: *** [all] Error 2
> till at till:~/printing/cups/bzr/y$
>
>
> On 08/08/2014 07:35 PM, Joseph Simon wrote:
> > Hello Till,
> >
> > The handling of sRGB, sGray, and AdobeRGB in rastertopdf has been
> > updated in revision 7248 of cups-filters.
> >
> > For both sGray and AdobeRGB, the PDF '/ColorSpace' is set to /CalGray
> > and /CalRGB, respectively, and are given the appropriate
> > whitepoint/gamma values.
> >
> > For sRGB, the '/ColorSpace' references an /ICCBased array object, which
> > in the PDF will include an embedded sRGB profile in its stream (using
> > LCMS to create the profile).
> >
> > Joseph Simon
> >
> >
> > On Thu, May 15, 2014 at 6:35 AM, Till Kamppeter
> > <till.kamppeter at gmail.com <mailto:till.kamppeter at gmail.com>> wrote:
> >
> > Hi Joseph,
> >
> > did you already have a look into filters of cups-filters and whether
> > they do correctly with color management?
> >
> > Also I have today committed a new rastertopdf filter to turn PWG
> Raster
> > input into PDF output. This works well if the input file is in Black,
> > RGB, or CMYK color space with 1 or 8 bits per component color depth.
> The
> > resulting PDF is in DeviceGray, DeviceRGB, or DeviceCMYK color space
> > then. How do I proceed with sGray, sRGB, and Adobe RGB? Simply using
> > DeviceGray, DeviceRGB gives broken output and is probably wrong in
> terms
> > of color management. What is correct here. Also 16 bit color depth
> with
> > Black and RGB gives broken output.
> >
> > Till
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/openicc/attachments/20140808/dc98c0f4/attachment.html>
More information about the openicc
mailing list