[ 
https://issues.apache.org/jira/browse/PDFBOX-3003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr reopened PDFBOX-3003:
-------------------------------------

My changes break preflight. There's a bug in the use of ColorSpaces.valueOf(). 
Colorspaces is an enum type:
{code}
public enum ColorSpaces
{

    Lab("Lab"), CalRGB("CalRGB"), CalGray("CalGray"), DeviceN("DeviceN"), 
Indexed("Indexed"), Indexed_SHORT("I"), Pattern(
            "Pattern"), ICCBased("ICCBased"), DeviceRGB("DeviceRGB"), 
DeviceRGB_SHORT("RGB"), DeviceGray("DeviceGray"), DeviceGray_SHORT(
            "G"), DeviceCMYK("DeviceCMYK"), DeviceCMYK_SHORT("CMYK"), 
Separation("Separation");
{code}
However the string parameter of valueOf "must match exactly an identifier used 
to declare an enum constant in this type". I.e. "CMYK" cannot work (but 
"DeviceCMYK_SHORT" would). This has worked until now because further code 
worked as if this was a resource color name, which worked because the short 
names were accepted by PDColorSpace.create(). Solution: rename the enum 
elements.

> Incorrect color space processing for inline images
> --------------------------------------------------
>
>                 Key: PDFBOX-3003
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3003
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: Evgeniy Muravitskiy
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.0
>
>         Attachments: ColorSpaceInlineImage.patch
>
>
> Getting wrong color space for inline images because of abbreviations. (PDF 
> Reference 1.4, chapter 4.8.6). 
> According to specification inline images can use directly (not by names) only 
> 4 color spaces: DeviceGray (Gray), DeviceCMYK (CMYK), DeviceRGB (RGB), 
> Indexed (I).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to