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]

Similar Messages

  • Please Help Get a Color from Pixel !!!!

    Is anybody know how to get a Color from pixel.
    My program is not Full Screen .
    So i think Robot.getPixelColor() don't suitable.
    Please Help me!

    Robot.getPixelColor() will work fine, but the problem you will have is getting the mouse set to the correct location and getting your application to know where it is: you can do it with win32 calls and JNI. Here are a few that I have found helpful--they are in a VB format:
    Public Const CLR_INVALID = &HFFFF 'not a valid pixel
    Public Const MOUSE_MOVED = &H1
    Public Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
    Public Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
    Public Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
    Public Const MOUSEEVENTF_RIGHTDOWN = &H8 ' right button down
    Public Const MOUSEEVENTF_RIGHTUP = &H10 ' right button up
    Public Const REQUEST_LEFT_CLICK = &H2D 'request left click "-"
    Public Const REQUEST_RIGHT_CLICK = &H2B 'request right click "+"
    Type POINTAPI
    x As Long
    y As Long
    End Type
    Type POINTSTRUCT
    hwnd As Long
    hdc As Long
    ptAbsolute As POINTAPI
    ptOrigin As POINTAPI
    ptLocal As POINTAPI
    ptColor As Long
    sType As String
    retMessage As Boolean
    End Type
    Declare Function GetCursorPos _
    Lib "user32" (ByRef lpPoint As POINTAPI) _
    As Long
    Declare Function SetCursorPos _
    Lib "user32" (ByVal x As Long, ByVal y As Long) _
    As Long
    Declare Sub mouse_event _
    Lib "user32" (ByVal dwFlags As Long, _
    ByVal dx As Long, _
    ByVal dy As Long, _
    ByVal cButtons As Long, _
    ByVal dwExtraInfo As Long)
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Declare Function GetMessageExtraInfo Lib "user32" () As Long
    Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, _
    ByVal x As Long, _
    ByVal y As Long) As Long
    Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, _
    ByVal yPoint As Long) As Long
    Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
    Declare Function GetWindowOrgEx Lib "gdi32" (ByVal hdc As Long, _
    ByRef lpPoint As POINTAPI) As Long

  • I have a color management problem.  I have OS X v 10.5, Adobe Photoshop Elements 6, and an Epson Stylus Photo R800.  I want to print images I have scanned on a Epson Perfection 1660 Photo and corrected in Photoshop and get the colors accurate.

    i have a color management problem.  I have OS X v 10.5, Adobe Photoshop Elements 6, and an Epson Stylus Photo R800.  I want to print images I have scanned on a Epson Perfection 1660 Photo and corrected in Photoshop and get the colors accurate.

    I used the ColorSync utility to verify, and it came back with this report:
    /Library/Printers/EPSON/InkjetPrinter/PrintingModule/SPR800_Core.plugin/Contents /Resources/ICCProfiles/SPR800 Standard.icc
       Tag 'dmnd': Tag size is not correct.
    /Library/Application Support/Adobe/Color/Profiles/Recommended/CoatedFOGRA27.icc
       Tag 'desc': Tag size is not correct.
    /Library/Printers/EPSON/InkjetPrinter/ICCProfiles/Standard.profiles/Contents/Res ources/Epson IJ Printer.icc
       Tag 'dmnd': Tag size is not correct.
    /Library/Printers/EPSON/InkjetPrinter/PrintingModule/SPR800_Core.plugin/Contents /Resources/
    I did not know what to do next.  At the bottom of the window it said to go to www.apple.com/colorsync to find a tutorial.  I got a message saying that link does not work.  Tried to find the tutorial by searching at apple.com, but could not seem to locate it.  Does anyone know what the report above means and what I should do about it?  
    Also, how to find that tutorial?
    Re Using RGB all the way through, When I print from Photoshop Elements, I select Adobe RGB, Photoshop Manages under "Color Handling", Relative Colometric  under "Intent" and "ColorSync" i the Epson printer box.  Do you mean to do something different in this sequence?

  • How to get RGB value from pixel of an image.

    hi, i need a little help... Is there any EASY way to get RGB value from point of an image? I searched javadoc but i only found very complex getRGB method working only with regions, and saving data into arrays.
    Is there any other way that can use for example image.getGraphics() (so, i mean to get RGB from point of Graphics object) ?
    Btw.: If you know, how Sprite.collidesWith(Sprite s, Boolean pixellevel) is working (with pixellevel = true), please write me. It could solve my problem too.
    Thanks

    Is there any other way that can use for example image.getGraphics() (so, i mean to get RGB from point of Graphics object) ?You can think of the graphics object like a pencil or paintbrush. Does a paintbrush know the color of the surface it is painting on? No.
    Btw.: If you know, how Sprite.collidesWith(Sprite s, Boolean pixellevel) is working (with pixellevel = true), please write me. It could solve my problem too.Download the reference implementation from this site and see for yourself.
    luck, db

  • Adobe Photoshop CC, problem with color noise/pixelation on the monitor display

    After downloading Adobe Photoshop CC, my images come in with color noise/pixelation on the monitor display. I've tried checking the color space preferences, but this doesn't help. I didn't have this problem before. Is there anything else I can check? There's no problem with LR, just Photoshop.

    My performance settings are: Available RAM 10905 MB/using 7633 MG (70 percent); cache levels 4, history 20, cache tile size 1024K. However, I noticed under Graphics processer settings, it is set on Advanced Drawing Mode - perhaps this should be changed to Normal or Basic Mode? Your help is very much appreciated.

  • How to get a color from point in layout?

    Hi All,
    I am trying to find RGB value of a color at a mouse location same as Eye-Dropper tool, I checked some HitTest methods but couldn't figure out which interface will give me color?
    Any pointers in right direction would be appreciated.
    Thanks,
    Praveen

    Using photoshop (PS), make PS so you can see the colour you want, create a blank page in PS, any size does not matter, use the eyedropper tool in photoshop click inside the blank page and hold the mouse button down, move the mouse to the coloured area that you want and release mouse. As you move the mouse you will see the foreground colour change.
    Photoshop will pick up the colour under the eyedropper.

  • How to get a color from point in layout (InDesign)?

    Hi All,
    I am trying to find RGB value of a color at a mouse location same as Eye-Dropper tool, I checked some HitTest methods but couldn't figure out which interface will give me color?
    Any pointers in right direction would be appreciated.

    (Intended as reply to the OP)
    In my good old Windows InDesign CS2 it works as follows:
    1. Open Window > Colour
    2. Press ALT and click by Eyedropper at any position
    3. Read RGB numbers
    This is valid for sequential measurement. Read helptext "Eyedropper".
    Best regards --Gernot Hoffmann

  • [CS2] Getting required fonts from a given IDataLink

    Given an IDataLink, gotten via ILinksManager::GetNthLinkUID(), how do I get access to the fonts required by this linked file (if any).
    From looking at SnpInspectFontMgr::TestAssetsForFonts(), I see that I can do this using the IFontNames interface, but I need to get access to the kEPSItem, kEPSTextItemBoss or kPlacedPDFItemBoss for the linked item to do this.
    I tried IDataLinkHelper::GetAssociatedPageItem(), but this just returns the UID of the IDataLink.
    Can anybody give me the sequence of steps needed to go from the kDataLinkBoss to the associated kEPSItem, kEPSTextItemBoss or kPlacedPDFItemBoss?
    Is there a better way to do this?

    Looked again at the documentation and figured out how to do it.
    The information is available on the Boss documentation (i.e. kDataLinkBoss).
    I had only been looking at the interface documentation (i.e. IDataLink) and assumed all of the information would be there.
    Now that I know this, it should make figuring out questions like this a little easier for me in future.
    Thanks again.

  • Anyone else having trouble opening CMYK PDFs from Photoshop CC with JPEG 'high' compression?

    (Cross-post from the Photoshop forum, where I was asked to post in the Acrobat forum: http://forums.adobe.com/message/5553829 )
    When I save a PDF file in Photoshop CC in CMYK color with JPEG compression (quality = high), it will save without any errors. However, when I open the file in Acrobat (11.0.3), I get an "Out of Memory" pop up error. I press Ok, and the document is just displayed as a blank white image.
    I'm using Win7 64-bit, Photoshop CC 64-bit. Plenty of memory (24GB) and allocated RAM in preferences, and I've done some troubleshooting that leads me to believe the error is not due to system memory, but rather a specific bug in the software. I have Photoshop CS6 on the same machine, and if I open the PSD, save as PDF with the above settings, everything is fine when I open it using Acrobat. This seems to just be for Photoshop CC, not CS6.
    Here is the troubleshooting I've done so far:
    PDF format, RGB color, any other settings --> Acrobat can open the file.
    PDF format, CMYK, no compression --> Acrobat can open the file.
    PDF format, CMYK, JPEG compression [medium] --> Acrobat can open the file.
    PDF format, CMYK, JPEG compression [high] --> Acrobat can NOT open the file because it encounters the "out of memory" error.
    PDF format, CMYK, JPEG compression [maximum] --> Acrobat can open the file.
    This is silly. I don't get it. Can anyone else confirm this problem for me?
    Updated:
    Like you said, there isn't enough information to rule out an issue with Photoshop CC, as the same action using Photoshop CS6 results in a usable file.
    New information (while making files for uploading):
    The error only occurs with CMYK files of larger dimensions. On a 500x500px image, Acrobat throws out "A drawing error has occured". a 2500x2500px image runs into the "Out of memory" error. In either case, Acrobat cannot successfully open the file generated by Photoshop CC, while it can if it was made using Photoshop CS6.
    RGB PDF JPEG HIGH - PsCC - No Error.pdf
    https://drive.google.com/uc?export=&confirm=no_antivirus&id=0B9lLW1Ml0 0iQc2ltUXhqVTRVaWs
    CMYK PDF JPEG HIGH - 500x500px - PsCC - Acrobat drawing error.pdf
    https://drive.google.com/uc?export=&confirm=no_antivirus&id=0B9lLW1Ml0 0iQZ3M2SS1PbEJuN0k
    CMYK PDF JPEG HIGH - 2500x2500px - PsCC - Acrobat out of memory error.pdf
    https://drive.google.com/uc?export=&confirm=no_antivirus&id=0B9lLW1Ml0 0iQd2dxWm9xWjk3bEE

    Another observation for what it is worth (not a solution again). I was able to open all 3 PDFs in Irfanview as graphics. The properties of the image were
    The major changes for the others within the JPegs was the number of pixels (133X133) and the size (1.4inX1.4in). There is also a reduction in the number of colors.
    Just for information, I opened the big JPeg in Acrobat (9.5.5) and it opened fine. However, it looks like the color space was changed as shown below:
    Even if I change the input to use CMYK and not RGB, it looks like it gets converted to RGB. I haven't spent time to figure out the preflight analysis properly, but at least this may give you some info back.

  • Get colors from image

    Is there any way to get the colors from an image in photoshop? Ideally, I would like a simple process to get a swatch collection from an existing image.
    Thanks,
    CFH

    I don't know if this is the easiest way, but, change Mode to Indexed. Go to Mode>Color Table and Save the table with a new name. Then you should be able to load it in the Swatches palette from the flyout. Choose .act in the dropdown.

  • Get color from paintPanel()

    I need a way to get the Color from a paint panel when the user clicks the mouse. I already have the mouse listener set up to return the co-ordinates within the paint panel.
    Could you suggest a class and method I could use, to get the color value from the paint panel.
    here's some of the code, so you know what i'm taking about
         public void mouseClicked (MouseEvent e)
                   System.out.println("the co-ordinates are "+ e.getX()+" "+e.getY());
              }

    There is no Image object there is only a paintPanel object.
    Doesn't seem to be a constructor for an image object in the Image Class.
    There must be an easier way of getting the pixel color for any given co-ordinates within the paintPanel object.

  • Photoshop CS2 crashes on launch -- kernel security error

    Photoshop CS2 won't launch from the internal boot drive. I'm running 10.4.7 with all updates as of 8/9/2006. The crash reporter shows a kernel security violation, and I forwarded tis report to Apple. The same copy of CS2, on the internal drive, will launch if I change startup disks and boot from an external drive, which contains an up-to-date OS as well. So the problem seems not to be with CS2.
    Disk Utility says it cannot repair the internal drive when I boot from the external drive, and it shows an entry in red that says "illegal name". Here's Disk Utility's dialog:
    Verify and Repair disk “Macintosh HD”
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Illegal name <-----here's the stinker!
    Checking multi-linked files.
    Checking Catalog hierarchy.
    Checking Extended Attributes file.
    Checking volume bitmap.
    Checking volume information.
    Repairing volume.
    The volume Macintosh HD could not be repaired.
    Error: The underlying task reported failure on exit
    I've repaired permissions on all disks, but the problem remained.
    TechTools Pro four passes the drive on all tests.
    Further info -- just a few hours before this problem arose yesterday, I backed up the internal drive using SuperDuper onto a partition of another external drive. That partition shows the same problem as the internal one, with DIsk Utility reporting illegal name.
    I have re-installed the CS2 package on bothe the internal and an external drive. Image Ready CS2 runs fine on both disks. To verify this I booted in turn from each disk and ran Image Ready.
    I downloaded and installed the 10.4.7 Combo Update. The problems remain as described.
    <br>
    eMac 1.25 Gh   Mac OS X (10.4.7)  
    eMac 1.25 Gh   Mac OS X (10.4.7)  
    eMac 1.25 Gh   Mac OS X (10.4.7)  

    Thanks for htis tip. It removed the illegal name error I was getting in Disk Utility, and I was then able to get a clean bill of health from Disk Utility after removing all the Legal folders from internal and external Illustrator, Photoshop, etc packages..
    However, the basic photoshop problem remains -- I can launch Photoshp CS2 on the external drive or on the internal drive, PROVIDED that I boot from the external drive. I can't launch either installation after booting from the internal disk.
    New information -- CS2 begins to launch, and the splash screen shows progress up to the item Building TWAIN menus. The the launch fails. Here is the beginning of the walkback from crash reporter:
    Date/Time: 2006-08-10 19:31:58.841 -0400
    OS Version: 10.4.7 (Build 8J135)
    Report Version: 4
    Command: Adobe Photoshop CS2
    Path: /Applications/Adobe Photoshop CS2/Adobe Photoshop CS2.app/Contents/MacOS/Adobe Photoshop CS2
    Parent: WindowServer [72]
    Version: 9.0 (9.0x196) (9.0)
    PID: 311
    Thread: 0
    Exception: EXCBADACCESS (0x0001)
    Codes: KERNINVALIDADDRESS (0x0001) at 0x72007900
    Thread 0 Crashed:
    0 <<00000000>> 0xfffeff20 objcmsgSendrtp + 32
    1 com.apple.CoreFoundation 0x907d22c0 __CFDictionaryDeallocate + 552
    2 com.apple.CoreFoundation 0x907bbf34 _CFRelease + 240
    3 com.apple.CoreFoundation 0x907f2540 __CFBundleDeallocate + 100
    4 com.apple.CoreFoundation 0x907bbf34 _CFRelease + 240
    5 org.twain.dsm 0x97f6edc8 GetFileList(TW_IDENTITY*, DS_LIST*) + 432
    6 org.twain.dsm 0x97f6ea88 DSMIdentity(TWIDENTITY*, unsigned short, TW_IDENTITY*) + 68
    7 org.twain.dsm 0x97f6e7ec DSM_Entry + 252
    8 com.adobe.Photoshop 0x00db8dac XPEPLaunch::StartApp(unsigned short const*, unsigned short const*, unsigned short const*, void**) + 2458944

  • Extract Pantone color from the PDF using c#.

    hi i have an requirement to extact pantone color from PDF. So i had decided will  go for acrobat.dll or illustrator library to get pantone and other color from the PDF.Can you please help me out how to proceed and get pantone color from PDF using c#.thanku in advance

    If the PDF has Pantone colors in it, you can use output preview to see it. If you want a Pantone equivalent of a CMYK value you can do this:
    In Illustrator, make a cmyk swatch of the desired color, open the Color Guide panel (Window > Color Guide), then press the Swatch Library button in the panel's lower left corner and choose color books> Pantone+solid coated. Clicking the first color in the Color Harmony section (the Base Color) at the top of the panel will add the closest PMS Spot Color equivalent to your Swatches panel.
    There is often no exact 4/C match for a spot color, but this method will get you in the ballpark.

  • Possible Noob Question: Correcting Colors From Cheap Digital Camera

    I'm somewhat embarrassed to ask this here, but ya gotta start some place.
    I'm a web dev so forgive my ignorance. I work with photos a lot, but they've always come to me from people who know what they're doing. I don't really understand digital -photography- that well---which is quite different I realise than film.
    Anyhoo, I'm trying to get better colors from a  pocket digital camera (Canon Elf 310) which (supposedly) has 12MP. The pictures I want to take for the job I have in mind involve clouds and landscapes and I gotta take a pocket came because we're camping/fishing.
    Anyway, they -could- be very cool but the tests I've done show that the colors are going to be just -wrong-. And by 'wrong' I mean everything either seems -under- saturated or hyper-statured. For example... the subtle pinks in clouds are rendered as washed out or will be overly contrasty (hyper) yellow to orange.
    The detail is quite sharp, however so does that mean there's something 'there' there which can be properly corrected? And if so, how?
    If it's too wordy, perhaps maybe someone can just recommend a good text on the subject?
    TIA,
    ---JC

    I completely agree with Mylenium.
    Beyond working with the various Tools in PS, for "Color Correction," I would start with a properly calibrated monitor, so that you know that what you are "correcting," is the Image, and not the monitor.
    Next, familiarization with those Tools, such as Hue/Saturation, will be very useful. The Help file can get you started, by defining what each Tool can do, and a short-course on how it does it.
    I would always work with non-destructive techniques, so that one can always go back and re-edit things. For that Hue/Saturation, mentioned above, I would use a Hue/Saturation Adjustment Layer. Same for Color Balance, and the rest.
    Last, you eye should be your guide, on that calibrated monitor. Adjust, until you get what YOU like (or what your client likes). Remember that by default, most of those "corrections" will be "global" for the Image, BUT with Layer Masks, you can restrict/constrain the corrections to just certain areas of that Image. At that point, knowing about the various Masking techniques will be very helpful. Besides the Help file, there are many useful tutorials on various Masking techniques, and many will apply to Layer Masks.
    Also be aware that different camera sensors might bias differently, and also with lower-resolution Images, you will likely not have a great deal of Dynamic Range to work with. Start with the best possible, from your camera. If possible, shoot in Camera RAW, and use the "processing" power of ACR (Adobe Camera RAW), to get started. You should be able to create a Preset for your camera (maybe shoot a McBeth Color Checker card, and calibrate that), to get that processing started.
    Good luck,
    Hunt

  • Consistent color from monitor to monitor

    What is the best way to get consistent color from one monitor to another. Is that even possible?

    What CP says.
    You need to calibrate and profile each one of your monitors regularly and often.  Don't expect them to look exactly the same unless they are identical, but the frequent and regular calibration and profiling are essential.
    http://www.gballard.net/psd/cmstheory.html

Maybe you are looking for