retrieve spot colors with identify from pdf

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
baskote

retrieve spot colors with identify from pdf

Post by baskote »

Hi,

ist it possible to get the spotcolors used in a pdf in the Color Statistics with identify ?

Any other suggestions ?

thanks

markus
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Can you post a URL to one or two PDF images that have spotcolors? We will also need to know how spotcolors are identified in PDF. It is easy enough to add metadata to images if we can readily extract the information from an image file format.
baskote

Post by baskote »

i posted 3 example pdfs to the location http://softwareftp.dig.de/pdfs/ . The name will identify the colors used.

In the pdf there are ColorSpaces defined. In the pdf spec its called "SpecialColor Spaces".

A link to the PDF Specification http://partners.adobe.com/public/develo ... rence.html

Staring on page 254 of the PDFSpec1.6 its described how SpecialColor Spaces will work and there are several examples how it looks in pdf with the different SpecialColorSpace types.

Hope this information is helpful for you ?

Markus
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Looks like we can easily return the spot color names such as HKS#2005#20Z but not the spot color itself.
baskote

Post by baskote »

Wow, 5 hours and i got a response, i really appreciate your response time and that it was for all postings as fast. Thanks

For mee the spot color name is want we want to have. I am not really clear what you mean if you write "but not the spot color itself".

On page 54 and 55 of the pdf specification you see how name literals are handled in pdf and the writing for "HKS#2005#20Z" is standing for "HKS 05 Z" so the "#20" is a encoded space character.
By the way if you prefer the character resolving should be done by the information consumer, then i can do this by myself.

Markus
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

The patch for spotcolor names is in ImageMagick 6.3.1-7 Beta available tommorrow. 6.3.1-7 is scheduled for release within a week or two.
baskote

Post by baskote »

thanks for implemeting the spot color function.

I found out that if i have a pdf combined of several other pdfs (XObjects) it could be that the Spotcolor name will be repeated.
And yes it could be that each similar name has different color specification inside, but i will not see it on the name, because the name could be same.

Is this behaviour what you like to have ? Or should each spot color name be shown once, because we will not see the color values ?

In my example i had 26 times "Black", because the page consist of 26 individual pdf images which all define "Black" by themself.


And is it possible to get some information skipped from verbose ? I only like to have color information and geometry information.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Its up to you how you would like spotcolors handled since so far you are the only one asking for them. You tell us what you'd like ans we'll get a patch in ImageMagick.
baskote

Post by baskote »

i would enjoy having a list of unique color names, as long as we will not know more about the colors beside the name.


thanks a lot for all your contribution
Post Reply