How to detect ColorMode correctly?

Post Reply
nicktazo
Newbie
Posts: 13
Joined: Sat Apr 13, 2013 5:31 pm

How to detect ColorMode correctly?

Post by nicktazo »

Dears



I tried to use switch to seperate the CMYK with RGB files. I set the stats.ColorMode and image.ColorMode but both can’t capture the PDFs’ color mode correctly. Mostly the files are unable to be identified just few will be known.



Could u kindly instruct me to make it?



Thanks much



Nick
carineb
Member
Posts: 31
Joined: Wed Oct 20, 2010 2:39 pm

How to detect ColorMode correctly?

Post by carineb »

Hi Nick,



the content of Image.ColorMode is set by Photoshop, PDFs not created by Photoshop might not have a value for that variable and thus unavailable for Switch to sort on.



Depending on the 3td party tools you have available, you might want to open and save those PDFs with Photoshop (which you could automate using the Photoshop configurator if installed) to update the variable and make it possible to use if for sorting.



Alternatively you can use another tool to determine the colorspace used in your PDFs. A solution like PitStop Server for example, can be automated using Switch as well.



Hope this helps you us sorting your files!



Kind regards,

Carine



PS: If you'd like us to take a look at your PDFs, please contact us at the coordinates listed in your Maintenance Contract, or contact your reseller directly if you currently don't own a Maintenance Contract.
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

How to detect ColorMode correctly?

Post by freddyp »

Ni hao Nick,



If all you want to know is whether your PDF file contains RGB elements you can use [Stats.ColorSpaceFamilies]. This returns all the color spaces that are used in the PDF file (one or several from the list 'DeviceGray', 'DeviceRGB', 'DeviceCMYK', 'CalGray', 'CalRGB', 'Lab', 'ICCBasedGray', 'ICCBasedRGB', 'ICCBasedCMYK', 'Indexed', 'Pattern', 'Separation', 'DeviceN').



There are some things to consider when using [Stats.ColorSpaceFamilies]. RGB elements will either be in DeviceRGB or CalRGB, so a condition with variables that checks if [Stats.ColorSpaceFamilies] "contains" "RGB" will be correct; "is equal to" "DeviceRGB" or even "contains" "DeviceRGB" could be wrong. Files with just "DeviceCMYK" may have empty CMY and be just black and white. A spot color could be defined as "Separation" or as "DeviceN", so for spot colors I use Stats.ColorSpaceFamilies in combination with Stats.Colorants. Etc.



As Carine wrote it is best to use PitStop Server to test specific cases in a more reliable way, but I think in your case [Stats.ColorSpaceFamilies] is a workable solution.



Freddy
nicktazo
Newbie
Posts: 13
Joined: Sat Apr 13, 2013 5:31 pm

How to detect ColorMode correctly?

Post by nicktazo »

Thanks Freddy & Carineb



it's a very clear answer. now i am using pitstop as a safe solution.



Thanks again for your help.



Nick
Post Reply