Calculating CMYK color coverage

Hi guys!
I am trying to write a simple plug-in to calculate the color usage of a given PDF page.The end result should be percentages how much of the page is covered in C, M, Y etc. Problem is I don't really know what the smartest approach to do it...
My idea is to renderer the PDF to a bitmap in memory (using something like PDPageDrawContentsToWindow) and then iterate on each pixel and sum the color values.
I've sen a couple of solutions on the webb and they seem to do it like that with ghostscript (ps2png and then sum the pixel color values).
Is this a sane approach, or should it be done in some other way?
Thanks!

Hi Irosenth!
Thanks for pointing out Preflight, but I'm doing this for other purposes adding a few custom needs. Also thanks for the bitmap hint! Opacity and overlapping would be a problem as you say.
Regarding rendering a PDF page to a memory buffer: Do you think PDPageDrawContentsToWindow is the way to go for rendering CMYK bitmaps or is there some other function that might be more useful?

Similar Messages

  • Photoshop CS2: Get CMYK color from pixel?

    Hi, in Photoshop CS3 I can use colorSamplers to pick up a CMYK color from a pixel. But I haven't found anything in the CS2 scripting reference about that.
    I cannot use channels["cyan"].histogram, because I need the calculated %-value (0100) from Photoshop, not the color index number (0255).
    Example:
    A pixel was filled with 70% cyan, Photoshop uses internally 69,8% and that's the value I want to read through a script.
    Any suggestions? :-)

    [email protected] wrote:
    > Hi, in Photoshop CS3 I can use colorSamplers to pick up a CMYK color from a pixel. But I haven't found anything in the CS2 scripting reference about that.
    >
    > I cannot use channels["cyan"].histogram, because I need the calculated %-value (0100) from Photoshop, not the color index number (0255).
    >
    > Example:
    > A pixel was filled with 70% cyan, Photoshop uses internally 69,8% and that's the value I want to read through a script.
    >
    > Any suggestions? :-)
    Try this:
    var cyanPercent = (channels["cyan"].histogram/255) * 100;
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • How do I find out if a photo in iPhoto is RGB or CMYK color?  How do I change from RGB to CMYK?

    How do I find out if a photo in iPhoto is RGB or CMYK color?  How do I change from RGB to CMYK?

    Open the file with Preview, type Command + i to bring up the Info pane and it's color mode and profile will be listed as shown here:
    To change the color mode to CMYK you'll need a 3rd party image editor like Photoshotp or GraphicConverter to do it.  Why do you need CMYK?
    OT

  • Converting from pantone to cmyk color mode in Indesign CS3??

    I am working on a business card for a customer, I am using Adobe Indesign CS3.
    I use an outside company for the printing job called 4over (4over.com) and they require you use their cmyk pdf print engine so they can do the job properly... Basically to break it down: I am in Indesign CS3, I choose Print, and as the printer I choose their "4over pdf cmyk print engine" so the colors do not convert and the color doesnt change when they use their printers.
    4over is telling me my document is in pantone color mode, they can see the pantone color 371C, but not the cmyk values.
    How do I change from pantone color mode to cmyk color mode???
    if anyone can help me please. I would really appreciate it.
    I attached the file I sent to 4over incase that helps anyone answer my question.
    Thank you,
    Brandon

    Before exporting, in the swatch panel, select your Pantone colour, right click and select swatch options. Change the color type to Process and the color mode to CMYK.
    If it's a business card and you showed the client a pantone swatch, know that you won't get the same colour results. There's a very useful Pantone book available that shows swatches side by side with CMYK values.
    http://www.pantone.com/pages/products/product.aspx?pid=283&ca=1&s=4

  • PDF in CMYK color space?

    I'm working on the most recent version of Pages from iWork 2008 running on the most recent version of Leopard, and I have to create a PDF in the CMYK color space for publication, but I do not have Acrobat Distiller.
    Is it possible to create a CMYK PDF with ColorSync filters? I have tried using the "Generate PDF-X/3" filter, with "Generic CMYK" as the target profile and transparency flattening, but the printer still says that my PDF is in the RGB color space. If not, is there any other way to create a CMYK PDF from Pages or to convert a RGB PDF or PostScript file to CMYK using ColorSync Utility? Are there any alternatives without purchasing Adobe Acrobat? What about if I first convert images to the CMYK color space before importing them to Pages?
    I have seen similar questions posted elsewhere, but I can't find a straight answer anywhere.

    1. Obtain the ICC profile from the printer for his output device.
    Correct. Either the shop printing condition or an ISO 12647 printing condition to which the shop can configure and calibrate the printing condition it is selling you. If the latter, you can get default ICC printer profiles for standard printing conditions at www.eci.org.
    2. Create a filter in ColorSync Utility for generating PDF/X-3 documents with the ICC profile as the output intent (besides flattening the transparency and applying an appropriate resolution).
    Correct.
    3. Print to PDF in Pages.
    Incorrect.
    Your PDF/X-3 filter will become available in the system dialog for File > Print > Save as PDF. In saving as PDF you pick your PDF/X-3 filter as the template for the save process.
    4. Use ColorSync Utility to modify the resulting PDF with the filter I created in ColorSync Utility.
    (or 3-4. Print directly to PDF through the filter from Pages)
    Your second step to combine 3 and 4 is correct, your first step 4 to save to disk and then postprocess in the ColorSync utility is incorrect.
    5. Send this PDF/X-3 to the printer.
    Correct.
    It seems that no hard conversion from RGB to CMYK should be necessary if I take these steps, is that correct?
    Correct.
    If I send the printer a PDF in the RGB color space, should it cause problems for him to convert the PDF himself to the color space of his output device?
    No.
    You create three channel RGB images in the RGB colourant data model (it's just a model, it is not a colour space which a size and a shape of the gamut).
    You save your colourants to disk in TIFF or PDF format with the ICC profile for the capture colour space (e.g. the ICC profile for your specific scanner with a Kodak EktaChrome IT8) or correction colour space (e.g. Joseph Holmes' RGB working space for EktaChrome). This ICC profile is the _colour space_ that you can view in the ColorSync Utility as a specific size and shape of gamut. The colour space determines what colours the colourants in your TIFF or PDF image should reproduce on different colour devices.
    You now have a pagination with photographic objects in three component RGB, and you know what colours those colourants are supposed to reproduce. You then include the production profile for the printing condition. Your source profiles must match to this destination profile in the matching session, so all your photographs get converted to the SAME ink limit, the SAME graybalance and so forth. This unifies the inking behaviour and the colour formation for your printing.
    If you imagine that in your pagination you place photographs which are manually converted into four component CMYK using a different ink limit, a different graybalance and so forth then you have not unified your inking behavour and colour formation for the printing process. This is IDIOTIC because the only way to correct in this case is to change the calibration of the individual inking zones on the offset press - increasing or decreasing the cyan, magenta, yellow or black for that zone.
    It used to be that lithography on the press was the only way to work. This was in the days of EPS and EPS DCS, and before that in the days of photographic printing masters pasted together manually piece by piece to make the printing planes. Nobody in their right mind works that way today.
    /hh

  • How do I export a file with a CMYK color profile in Lightroom?

    I'm trying to save a photo with a CMYK color profile to send to a company who will print it for me. I've looked at the color profiles installed on my computer, and quite a few CMYK profiles appear to be there (in   /Library/Application Support/Adobe/Color/Profiles/Recommended). I'm not sure if they need to be in the "Profiles" folder specifically, or if it matters that they're in a subfolder of that folder. This is on a Mac computer, by the way.
    The problem is, when I go to export in Lightroom, and I choose "Other" in Color Profile, I'm not given any of the CMYK options.
    Thanks for your help!
    Ray

    ray7199 wrote:
    I'm trying to save a photo with a CMYK color profile to send to a company who will print it for me. I've looked at the color profiles installed on my computer, and quite a few CMYK profiles appear to be there (in   /Library/Application Support/Adobe/Color/Profiles/Recommended).
    Above and beyond what Jeff and John have told you, be VERY careful converting RGB to CMYK unless you have the specific ICC profile for that print provider. Probably a lot safer to send them tagged RGB and let them convert the data. Converting with a profile that isn't specifically targeted for the print process will produce huge headache's for you and the shop and potentially awful output which is going to be expensive. Ask them if they can accept RGB and send them maybe sRGB which of course you can do from Lightroom.

  • Can Acrobat X Standard create PDF files from Microsoft Word, using "CMYK" color (required by most book printers) instead of "RGB" color?

    I'd like to purchase Acrobat Standard if it will let me control the color space used in the PDF it creates.  I need to send a color file to a commercial book printer, and they require the PDF file to use CMYK colors, not RGB.
    Will Acrobat Standard do this, and if so, how?  Or do I need to get a different Adobe product for this task?

    I'd like to purchase Acrobat Standard if it will let me control the color space used in the PDF it creates.  I need to send a color file to a commercial book printer, and they require the PDF file to use CMYK colors, not RGB.
    Will Acrobat Standard do this, and if so, how?  Or do I need to get a different Adobe product for this task?

  • 'Convert CMYK Colors to RGB' still runs havoc in 9! (Plus a PDF version problem)

    This post is to warn people about severe issues, and how to avoid them. Issues with the CMYK color setting in FM9.x have been reported here earlier, such as:
    http://forums.adobe.com/message/1237696#1237696
    http://forums.adobe.com/message/1237852#1237852
    http://forums.adobe.com/message/1237165#1237165
    However, I do not think this issue has been warned about anywhere near as much as it should have. And, as usual, Adobe is silent (they should have a big poster on their site warning about this issue! And they have even claimed that patches have "solved" the issues with CMYK).
    Just recently, while experimenting with FM9 again, I had extreme problems, which, at first, seemed totally unrelated to this CMYK setting. But after having struggled extremely hard for many many many hours, I finally found out. Now is the time to inform others:
    First a note about versions: FrameMaker 9.0p237, Acrobat Distiller 9.1, XP SP2
    It looks perfectly okay on screen in FrameMaker, exactly as in FM8. But when saved as pdf, several things are "corrupted". Examples: no kerning after the letter 'T', such as the word 'Text'. Dotted leader for a right aligned tab disappears. Some objects from the master pages, such as a logo, become enclosed in a rectangle (a border of the frame/object), but it only happens on *some* body pages, whereas other body pages using the same master page are ok!!? Equations are formatted differently from the way they should, with the wrong font for number, etcetera.
    Solutions:
    1. When 'Save as PDF...', untick 'Convert CMYK Colors to RGB' in PDF Setup. Same setting is in the file's 'Format > Document > PDF Setup...'
    A drawback with this method is that, as of Acrobat Distiller v9, it does not seem to respect the pdf version specified in the PDF job Options! I get PDF 1.6 with this method, despite my job option specifies version 1.5. (This happens also with FrameMaker 8 if Acrobat is v9.) So you *have* to optimize it in Acrobat in order to get a web friendly PDF (PDF 1.4 or 1.5).
    or
    2. Print to 'Adobe PDF'.
    In this latter case, you can set the same 'PDF Setup' settings under the button 'Setup...', EXCEPT that there is no tick box for 'Convert CMYK Colors to RGB', and it does not matter what setting you have chosen in the file's 'Format > Document > PDF Setup...', it will be RGB conversion in any case. Make sure that after you exit the setting, the tick box for 'Print to File' is NOT ticked! This method respects the pdf version specified in the PDF job Options! I get PDF 1.5, which is what my job option specifies.
    (For some reason, Acrobat/Reader does not render these two PDFs exactly the same, except in extreme magnification! Maybe it has to do with the different PDF versions of the files.)
    In either case, the solution actually solves ALL problems I listed! Despite it seems to have absolutely nothing whatsoever to do with colors! Some day in the distant future, CMYK might actually work! But, for myself, I would prefer a proper color management instead...
    Best Regards,
      /Harald

    Oops!! Not until now I discover that under 'Solutions' I happened to write 'untick' where it should be 'tick'! I.e, colors SHOULD be converted to RGB in order to circumvent the problems! I.e it runs havoc in v9 when CMYK colors are NOT converted to RGB! Don't know how I came to write the opposite, but probably I started out by describing the situation where the problems are seen rather than describing how to avoid them.
    Equally strange is that nobody corrected me, but perhaps the mistake was so obvious? (But whether you see problems or not might depend on what fonts you use. So, under certain special circumstances, CMYK might actually work without these reported problems.)
    I am also a bit surprised that others haven't reported the issue that the PDF version set in PDF job Options isn't respected when using 'Save As PDF' and Acrobat 9? (Or maybe someone has, but I have missed it.)

  • FM10 Crashes when Convert CMYK colors to RGB selected

    Hi folks,
    I have searched for info on this issue and found a couple of items but I'm still having problems doing what I need to do.
    First off, FM 10 version is 10.0.2.419. PC is Dell E6420 laptop, Win 7 SP1, 8GB RAM, big hard drive. No existing Adobe software before installing TCS 3.0 from local files (copied from DVD).
    At first I could not create a pdf (using File > Save as PDF) at all on this system (my old XP system still works fine with TCS 3.0). Instant crash and error messages (Internal error 10024, 7687848, 7688138, 10076935.). After reading the discussions, I cleared the check box for Convert CMYK colors to RGB, which allowed me to create the pdf. However, my colors are washed out completely. So I need to be able to select this check box without the crash.
    Any suggestions?
    Thanks!

    (1)     Although FrameMaker 10 is a 32-bit application, there was no issue with it running under Windows 7 64-bit. You certainly don't need to run it under any XP mode!!!!
    (2)     There were any number of save as PDF bugs in FrameMaker 10 that were fixed in various updates, but typically they were associated with when one didn't check that convert CMYK to RGB option (that uses the native Windows GDI for PostScript creation).
    (3)     Rather than printing to File and distilling, try printing directly to the Adobe PDF PostScript printer driver instance.
              - Dov

  • Why CMYK Color Profiles Warning?

    Hi guys,
    I just made a couple of CMYK shades of grey. Here is a sample:
    http://www.pixentral.com/show.php?picture=1fo01uualiQLkc4uuLbXfnAoWsiVw
    When i export the PDF to High Quality Printing, i get Warning Icon with the message "The preset specifies source profiles that don’t match the current color settings file. Profiles specified by the current color setting will be used" Why do i get that message? i am not using or importing any Photoshop Image with a different color profile...i just created my CMYK color inside my document.
    I am sending this PDF to a Laser Color CMYK Printer (not my own home laser printer) something like a Kinkos Store.  Could that be a problem for color settings to a this kind of printers? By the way, these are my color profiles.
    http://www.pixentral.com/show.php?picture=1EEuCxcbSjWaY2cNQj8dBAFedNlly0
    is in Spanish but i think i quite clear.
    Thanks for any info on that!
    Cheers,
    S

    I'm here because I was researching the same error. I've gotten it for years, and usually worked around it but finally got around to trying to get to the bottom of it. One thing I just noticed is that I had a file where I received this warning, and then went to Edit > Convert to profile in ID. I noticed that the Source of the file was NOT the working space set in my color settings (different computer from where I created it). I converted the file to the working space profile, and went back to Export to PDF again, and DID NOT get the warning.
    My concern would be what ID does if you ignore the warning. If my profile was different from teh working profile and I go ahead and covert anyway, will ID ASSIGN the working profile to my file, or CONVERT my images to the working profile specified in the color settings file. Which it chooses will likely have an inpact on my color. I might try to test this by creating an image in a wierd source profile that will look quite different if the numbers are just ASSIGNED a new profile and Export to PDF and see what happens. I think that might tell me what ID is doing.
    I really would like to understand this for certain.

  • Why does Illustrator change CMYK color numbers when set to preserve them?

    I'm using CS2 on Mac OSX 10.4. Recently I tried importing a Photoshop image into Illustrator and then matching a color in Illustrator to a color in the Photoshop document. But Illustrator changed the CMYK values of the color in the Photoshop document even though I have "Preserve CMYK colors" checked in the color setup window. Both applications and files are set to SWOP v2.
    I don't have the same problem when placing either Photoshop or Illustrator files into InDesign.
    I ended up recreating the project in InDesign to get consistent color, but I need to know how to make Illustrator preserve color numbers for the project that will come up for which I need Illustrator features.
    Thanks.

    So here we are at Illustrator CC and this very simple integration has not been fixed... because as far as I'm concerned... it is a BUG!
    Seriously, no offense to @Steve Fairburn... but that is just so archaic for a "suite" of programs that should work well together.
    There is absolutely NO need for CMYK colors to be valued beyond solid percentages in 1% increments in either Illustrator or InDesign!
    Here's a stupid workaround if you need to link images, and pull colors:
    Load the image as "linked" -> duplicate it and choose "embed" -> pull the colors and make swatches with the eyedropper tool... then throw it away. You could also just relink the file after an embed, making sure to check the Adanced Options checkbox.
    ADDITIONAL NOTES:
    1) why does InDesign give you the ability to "Reveal the Linked Image on the Desktop", whereas in Illy you can only reveal in Bridge?
    2) "placing" the same PSD/PDF image in InDesign and Illustrator: ID allows for correct eydropper color pulling, while IL does not until you embed it.

  • How to get the "CMYK" Color percentages?

    Could you please advise me how to get the "CMYK" Color percentages of every pixel via scripting.

    You have to be patched to the 10.0.2 version of FM and you must use the CMYK option with SaveAsPDF. If thee colour is defined as Spot in the FM file, it should remain as a spot colour in th PDF. However, that being said, the CMYK route is still a bit wonky (even in FM12) and you may get odd results in your PDF.
    Alternatives are to make the fix in Acrobat with the Print Production tools (or even better to use a third-party tool like Enfocus Pro) or to use GrafikHuset's (now freebie) PubliPDF to convert FM's RGB postscript output to CMYK+Spot PDFs. Download at: http://design.grafikhuset.dk/index.php/kontakt/downloads/grafikhuset-publi-pdf and more details available at: http://www.grafikhuset.net/PubliPDF/

  • Transparency in CMYK color mode

    Windows XP Pro, Photoshop CS3
    It seems  that one can only retain background transparency if image file is saved in PNG or GIF file format. It also seems that one cannot save to these file formats if graphic is in CMYK color mode - one must be in RBG mode to do so. How can I retain image with transparency in CMYK color?

    I am starting with a TIF image in RBG color mode, a tree with grass in the background and foreground for example. I would like to eliminate the grass, make that background and foreground transparent with the background eraser tool so that only the tree remains and that when the tree is superimposed on a second image the background and foreground surrounding the tree will be that second image. In order to make the background and foreground of the tree transparent I have to save the file in GIF or PNG format since transparency doesn't seem work with TIF files however I cannot convert the GIF or PNG files from RBG to CMYK. CMYK doesn't seem work with those file types.
    From: J Maloney [email protected]
    Sent: Sunday, September 27, 2009 4:00 PM
    To: Todd Beckerman
    Subject: Transparency in CMYK color mode
    PSD, PDF or TIF. Retain transparency for what?

  • Converting CMYK color model vlaues (0-100) to liquid color volume using labview

    Hellow all,
    How I can convert CMYK color model vlaues (0-100) to liquid color volume using labview?
    best regards

    What does "liquid color volume" mean?
    You should continue in your original message thread and not create a new one.  CMYK colors mixing icon or vi

  • Removing CMYK color information from cropmarks

    Hello!
    I need to run an Acrobat 6 preflight function for Black and Spot Color on a printed pdf (with crop marks, registration marks and file information) and in the report i always have CMYK used. The document uses only greyscale and spot color.
    I checked the pdf and only the printing marks added automatically by InDesign 4.0.5 have CMYK color information.
    Is it possible to change the color of these marks automatically, from anywhere in the application or with a plug in?
    Does anybody know a way to remove CMYK, as i need to send the preflight report to the client for checking.

    >It's a bit of a technical story, but you can do just about anything you want with the crop marks.
    But not, as I read it, change the color. I think that automatic crop marks are always going to be [Registration] color -- and in general they out to be. If you need marks that are K only, or K and your spot, I think you'll need to create them manually in the bleed area.
    That said, have you checked the output preview to see if any extra plates are actually being produced?
    The inclusion of marks implies to me that this is a stand-alone file, not an ad or similar material to be incorporated onto another page. Would there be a problem simply ignoring the C, M and Y plates when it's time to make film?
    Peter

Maybe you are looking for

  • TS3276 why i can't see send email from iPad in mac book mail

    hi, i need help regarding using of MAIL 5.2, i am using the Mac Book pro Mac OS X. I am also using ipad 3 and Iphone 4s, now the question is if i send an email from my gmail account already configured in iphone 4s to any other email, then that send e

  • Acrobat Catalog in 9 Pro Extended?

    I am currently using Acrobat 6.05. I use the Acrobat Catalog application built into Acrobat extensively, creating many large indexes of searchable pdf documents. I am unable to determine whether the Catalog application is available in the newest vers

  • Can anyone tell me a how to create layers?

    I have a page with a flash graphic and I've added a floating image to the page.  When the image floats, part of it is behind the flash graphic.  I want it to be on top.  I think this has to do with layers, but I can't seem to find any documentation t

  • How to replace a regular exepresion in a string in power shell

    Hi, Not able to replace "\X25" with "%" in powershell script. $new = $inst1 $word = '\X25' also tried $word = "\X25" $replacement = "%" $newText = $new -replace $word,$replacement following error has been occurred: The regular expression pattern \X25

  • Oracle 10G on RAC

    Hi all, I am searching for doc on Oracle 10G on RAC.Please send me the related link. Thanks in advance Vipin