[poppler] ColorSpace as dictionary, parse or not?
Leonard Rosenthol
lrosenth at adobe.com
Fri Nov 11 08:23:28 PST 2011
ISO 32000-1:2008, 8.6.5.6 is all about the Default colorspaces. Here's one
key piece:
When a device colour space is selected, the ColorSpace subdictionary of
the current resource dictionary (see
7.8.3, "Resource Dictionaries") is checked for the presence of an entry
designating a corresponding default
colour space (DefaultGray , DefaultRGB , or DefaultCMYK , corresponding
to DeviceGray , DeviceRGB , or
DeviceCMYK , respectively). If such an entry is present, its value shall
be used as the colour space for the
operation currently being performed.
Basically these three are special and need to be treated that way. NOT
ONLY in terms of the parsing (as you've discovered) BUT also in the actual
rendering. These spaces were designed to enable color managed color in
older PDF files -> basically a map/alias for the standard g/rg/k operators
to point to ICCBased colorspaces. That's why the example you post is
actually stupid - since it doesn't do anything other than complicate the
rendering process.
Leonard
On 11/11/11 10:46 AM, "Albert Astals Cid" <aacid at kde.org> wrote:
>I just came accross a file that has
>
>ColorSpace<</DefaultRGB<</ColorSpace/DeviceRGB>>>>
>
>At the moment we only parse colorspaces as name (for the wellknown ones
>that
>have no params) or as arrays. The spec only mentions arrays as far as i
>can
>see.
>
>I'd say not parse it, but i'm open to suggestions.
>
>Albert
>_______________________________________________
>poppler mailing list
>poppler at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list