Read ICC profile information of an image

Dear community,
for my further implementation I need some information about the ICC profile used for an actual image edited inside Photoshop. How can I read the ICC informations about an image?
I am implementing an export plug-in and found some ICC component inside the ExportRecord struct, called:
Handle iCCprofileData; /**< Handle containing the ICC profile for the image. (NULL if none.)
                                            Photoshop allocates the handle using the Photoshop handle suite.
                                            The handle is unlocked while calling the plug-in.
                                            The handle is valid from  \c ExportSelectorStart to \c ExportSelectorFinish
                                            Photoshop frees the handle after \c ExportSelectorFinish. */
int32 iCCprofileSize; /**< Size of profile. */
int32 canUseICCProfiles; /**< Non-zero if the host can accept or export ICC profiles .
                                            If this is zero, the plug-in should not set or dereference \c iCCprofileData. */
What I am not understand:
How can I read the iCCprofileData and which information will be delivered by the iCCprofileSize?
For iCCprofileData I got int values like @179952120 or @179952176. They differ for every loaded image. Seems that I just read the memory address. The "Handle" points to an empty char '\0'. I have no idea how to work with the datatype "Handle" correctly ...
For the iCCprofileSize I got integer values like 544 for the embedded profile Adobe RGB (1998), 3144 for the working color space sRGB IEC61966-2.1 or also 3144 for the embedded profile without color management:
embedded profile  = Adobe RGB (1998) -> iCCprofileSize = 544 (or sometimes 560)
working color space = sRGB IEC61966-2.1 -> iCCprofileSize = 3144
embedded profile = without color management -> iCCprofileSize = 3144
embedded profile = SWOP2006_Coated3v2 -> iCCprofileSize = 2747952
working color space = Coated FOGRA39 (ISO 12647-2:2004) -> iCCprofileSize = 654352
embedded profile = without color management -> iCCprofileSize = 654352
The variable canUseICCProfiles delivers always the value 1. As well if I selected the embedded profile without color management.
Can I infer from the iCCprofileSize which profile will be used by each image?
Does somebody has more experience with these there members (iCCprofileData, iCCprofileSize and canUseICCProfiles) of the struct ExportRecord?
I would be grateful for some hints.
King regards,
Silver

hai,
i paste the java source code for getting each pixel value of an image.i think that this code is usefull to you.
import java.awt.image.PixelGrabber;
import java.awt.Toolkit;
import java.awt.Image;
class getpixel2
public static void main(String args[]) throws Exception
Image image = Toolkit.getDefaultToolkit().getImage("D:\\one.jpg");
if(image==null)
System.out.println("NO FIle");
PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, false);
if (grabber.grabPixels())
int width = grabber.getWidth();
int height = grabber.getHeight();
if (isGreyscaleImage(grabber))
byte[] data = (byte[]) grabber.getPixels();
else
int[] data = (int[]) grabber.getPixels();
for(int i=0;i<data.length;i++)
int r = (data[i] >> 16) & 0xff;
int g = (data[i] >> 8) & 0xff;
int b = (data[i] >> 0) & 0xff;
System.out.println("(R,G,B)=("+r+","+g+","+b+")");
public static final boolean isGreyscaleImage(PixelGrabber pg)
return pg.getPixels() instanceof byte[];
}

Similar Messages

  • Console Log shows "Unable to read ICC profile", iWeb and Mail crash

    Hi experts
    I've a problem with what appears to be my ICC profiles. Mail and iWeb will consistently crash due to this problem. As the subject above says, all Applications will regularly report the following in console.log:
    cmsDataProviderGetBytes : CMCopyProfile: returned -4204
    CMSValidateProfile : Unable to read ICC profile
    To reproduce:
    in Mail:
    1) Open Mail and go to Apple Menu > Preferences > Rules
    2) Create a rule with action "Set Color of background" and in the colour picker drop-down menu choose "Other" -> Crash
    in iWeb:
    1) Open iWeb, choose "Welcome" as a template and click "Choose" -> crash
    In an attempt to solve the problem, I have tried:
    1) Using ColorSync Utility to fix profiles
    2) Replacing /Library/ColorSync/Profiles from the OS X DVD
    3) Creating a new profile using Display Calibrator Assistant
    4) Creating a new profile using a third party application, SuperCal
    5) Repairing permissions/my startup disk using Disk Utility (doing this last of course)
    Does anyone have some other ideas? I don't know whether this is new to 10.4.4 or not.
    Thanks in advance,
    Paul.

    Have had the same problem when I tried an experiment to get iPhoto to stop adding a color profile on my existing photos without a profile.
    I removed the .icc files in /System/Library/ColorSync/Profiles and got similar messages in console.log as you do.
    Moving the icc. files back made the problem disappear.
    What files does your folder mentioned above contain?
    Guess you should have the same files as I do.
    My folder contains 6 icc. files, including Adobe RGB 1998 and sRGB. Removing these solves my iPhoto fuckup, but as you experience makes other apps crash (like iWeb ..)

  • ICC Profile vs Photoshop vs Image

    Hi guys,
    First of all, please forgive my poor english.
    I have as usual been through all the forum-reading, answer-searching stuff.
    I've been having a problem with Photoshop color management since my last Windows upgrade to 7.
    Colors just won't display the same in Photoshop and outside Photoshop.
    I understand this has something to do with ICC profiles and applications being color managed or not.
    I just downloaded an ICC profile supposedly corresponding to my monitor (there : mine is the Dell E228WFPc, but their icc is for the E228WFP http://www.focus-numerique.com/test-42/-telecharger-un-profil-calibre-pour-son-ecran-dell- 24.html I decided to try it anyway, and the colors look good...).
    I don't know what makes photos not look the same inside of Photoshop. It's the case for all photographs, including those that I postworked before my reinstallation of Windows.
    What would you suggest ?
    Thanks in advance for your answers.

    Color-management is simply the process of interpreting the colors in an image per a given document color profile, then preparing them for proper display on a device using a given device color profile.  Profiles describe how color values are interpreted into real colors that we see.
    Some of the first things to keep in mind with color-management are these:
    Not all applications are color-managed.  Many do not look at your monitor profile, and almost as many don't even look at your document profile.
    Given the above, colors can be expected to look different in images displayed by applications that ARE color-managed vs. those that ARE NOT.
    So in your case Photoshop, which is fully color-managed, is using both your image profile and your monitor-specific profile (and assuming they're accurate) to determine how to display colors on your monitor. This is NOT being done AT ALL in some apps, and only HALF being done in others (e.g., IE9 interprets the document profile but assumes your monitor is sRGB IEC61966-2.1).
    You're seeing the differences.
    Now, what's not a given is that your color profiles are accurately representing the color spaces of your document or display monitor.  You may have prepared your document properly using a particular color profile, but what steps have you taken to ensure your monitor color profile accurately matches your monitor?  That it's "the one" provided by the manufacturer may seem to be enough, but you don't really know what on-monitor settings or video card or cabling the manufaturer used to profile it, nor did they profile your particular copy.  In short, factory monitor profiles are notoriously inaccurate.
    You can choose to go in one of three directions:
    1.  Assume your factory monitor profile is accurate enough and just keep everything as it is.
    2.  Purchase a profiling device, follow their process for calibrating / profiling your display, and be sure your profile is accurate.
    3.  Assume your factory monitor profile is INACCURATE, replace it with the standard default sRGB IEC61966-2.1 profile, and work to set your monitor controls and video card curves manually to make colors displayed with the sRGB profile and this monitor as accurate as possible.
    The 3rd scenario actually has some advantages if you can accomplish it.
    -Noel

  • A way to activate ICC profiles for all applied images

    Hi there!
    I think there should be an option in InDesign to activate the ICC profiles for all the applied images.
    For those who work with PDF/X-4 and a Workflow-based Color Management, it's very important to take the images' profiles into account.
    I tried and tried, but could not find a way to make it all at once in InDesign.
    Today I have to change the color settings so the INDD's profiles won't match the Color Settings' one, and then open the INDD choosing "Activate All Profiles" on the "Profile mismatch" window.
    It could have an option to choose to activate only the CMYK or RGB profiles and even choose what profiles to activate or not.
    Who would agree with me?
    Tiago Cheregati

    First of all thanks for your help, Dov.
    I may be wrong, but from the tests I made, the image's ICC profile is honored only if the InDesign Color Settings CMYK field is set to "Preserve Embedded Profiles".
    If, at the moment that you place it, Color Settings are set to "Preserve Numbers (Ignore linked profiles), InDesign will "forget" the ICC, and won't send it to the PDF/X-4 even if you ask him to.
    Now, I don't remember which is the default option for InDesign's Color Settings, but we receive a lot of .indd files (most of them books) whose images are profile-ignored. And then either we change it one-by-one or we assing another profile for the .indd, save, close, open it again and ask him to "re-enable" the profiles in the Profile Mismatch window. As I mentioned above.
    So, in response to your question, I wanted InDesign to offer live control to these options, so I can send to the PDF what I really wanted in an easier way.
    Again, I may be standing on a wrong supposition.
    Of course our heads together will think better than one.
    Best wishes,
    Tiago Cheregati

  • PS CS5 Image Display Differs From Used ICC Profile In Win 7

    Hi,
    on my Windows 7 Ultimate x64 machine, I just calibrated my Dell SP2309W monitor using an i1DisplayPro and basICColor 5, creating a ICC v2 profile (I am aware of the problems under Windows with ICC v4 profiles).
    It created the ICC profile and applied it to be used by Windows. I double checked under COLOR MANAGEMENT that the new ICC profile is being used. Although I can see that the new ICC is being used (desktop appearance changes), there are a few issues I am experiencing:
    (1.) Windows Photo Viewer
    The thumbnails in Windpows Explorer look fine (they DO use the new ICC profile), when I double click a jpeg and open the image it DOES NOT use the new ICC profile. When I click the PLAY SLIDESHOW button (starting the slideshow) in the opened image in Windows Photo Viewer, the images DO use the new ICC profile.
    (2.) Internet Browsers
    All current internet browser (Firefox, IE, Safari and Chrome) DO use the new ICC profile and display the image correctly.
    (3.) Photoshop CS 5
    When I open the same image - that Windows Photo Viewer does not correctly displays (according to the new ICC profile) - in Photoshop CS5, I get the same image display that Windows Photo Viewer gives me (when not thumbnail or not in slideshow mode) - it appears to be the sRGB display.
    My color settings in PS CS5 are: North America General Purpose 2 > sRGB IEC 61966-2.1.
    When I go to View > Proof Setup > Monitor RGB I get the image display using the new ICC profile.
    Why does the image look different in PS than my calibrated monitor should output ?
    I was under the impression (please correct me if I am wrong), that the sole purpose for calibrating my monitor was to get a uniform display across (ICC aware) applications. Even when one applies different color spaces to a document in PS, I thought the output on my calibrated screen done by the graphic card should always be according to my calibration and the settings in the ICC profile being used.
    What Am I doing wrong or what am I misunderstanding ?
    Any help or input is appreciated !
    Thanks.
    - M

    Hello,
    A note on monitor calibration: calibrating your monitor will not guarentee that every application will display color correctly, it's more of a step along the pipeline, and for the preview part of a color workflow it's the last step.  Here's how color translation follows for an ICC workflow when previewing to a monitor:
    Image Color Numbers > Document Tag or Workspace Profile > Monitor Profile
    For non-color managed applications, if the original document is or isn't tagged with a color profile it will be translated directly to the monitor profile anyway.  This is the equivalent in Photoshop of selecting "Monitor" in soft proofing.  Selecting monitor in softproofing will bypass the tagged or workspace profile to translate colors directly through the monitor profile.
    For most automatic color managed applications (like Firefox), the image will be translated through the tagged profile and then sent through the monitor profile.  If the image is untagged or the profile is unrecognized, the colors get sent directly to the monitor profile.
    For Photoshop, a tagged document will have its profile respected and then sent to the monitor.  An untagged document will be assigned the workspace profile, which acts like a temporary document profile, and then gets sent to the monitor.  This is often why users will notice Photoshop behaves differently from other applications.  It's usually a case of the workspace coming into play.  By default the workspace profile is set to sRGB.  You can change this in Edit > Color Settings.
    The purpose of the workspace is originally for printing workflows, as a way of keeping consistant color translations when dealing with both tagged and untagged documents.  For web output workflows it can be useful for viewing everything through sRGB, which is typical of the average monitor output (not so with newer wide-gamut monitors, another source of confusion...) combined with the fact that originally most web browsers were not color managed.  Hence viewing everything through sRGB is pretty close to what most monitors see and what untagged/unmanaged docs will look like.
    Monitor calibration is useful only because it brings your monitor output to a "known state".  In traditional workflows the monitor was always a middle-man, a preview device which was useful for getting an idea of what the printed output would look like before you print it.  Since print colorspaces are often smaller than display spaces, it's feasible and useful to narrow down the monitor/display space and calibrate it to a known state, so that even if it doesn't totally match the print, you'll get used to its differences/limitations and they'll be consistent so long as the calibration is maintained.
    For web output, your final output is often another user's computer monitor, which can have any form of behavior (most standard monitors are pretty close to sRGB, or use sRGB as an operating system workspace (default monitor profile).  Wide gamuts behave differently, but I'm not sure if there's a particular ICC space that they closely match, or if different wide-gamuts are even that close to each other in their display color spaces.
    Hope this helps!

  • ICC profile being stripped when pushing image to PS with PS Touch

    Hi guys, we are having some problems keeping the icc profile intact of the image files we are pushing from tablet to PS. They always appear in PS as untagged. This is a probelm for users who have highly claibbrated systems as the images appear very, very weird. Any ideas how to keep the profile intact?
    Cheers,
    Philip

    The most recent version I've seen was pretty clear in the documentation:
    "ICC profile, not implemented in this version of Photoshop"
    So the image you send needs to be sRGB
    Sandy

  • Embedding ICC-profiles in pdf

    I'm having problems getting InDesign to embed the ICC-profiles for CMYK images when exporting a PDF/X-3 from either CS5 or CS 5.5.
    The RGB images all have the correct ICC-profiles, but the CMYK images only show as CMYK in PitStop.
    Any ideas how to get this working properly?
    I want to use Enfocus PitStop Connect to flightcheck the PDF before sending it to out ftp-server, but due to the ICC-profiles not being embedded properly all files receive an error.

    Thanks Shulin but I've already downloaded the acrosdk. The samples work based on plug in functionality to acrobat i.e. they call an api when acrobat runs. I want to write to the pdf file from my own C++ program which is only linked with the XMP toolkit as opposed to a plug-in. I am looking for the same kind of information that was supplied for JPG, TIFF by Adobe, only for PDF.
    I've checked the knowledgebase as you suggested and this information is not there.
    What are the data structures that need to be modified to stick the XMP packet into a pdf file. Can I just append it to the end of the file?
    Steve

  • ICC profiles jpeg in SWF

    Hi,
    Is it possible to embed an ICC profiled (CMYK/RGB) jpeg image in the SWF file? From which flash player version is it supported?
    Are there any API's in action script 3.0 to help creating the same?
    Thanks
    Rahul

    Chris,
    Thanks for the input. In CS5, my soft proofing settings would typically
    mirror my printer profiles. I would be able to load my profiles from the
    print area in CS5 simply by placing them in the colorsync folder in my mac.
    The files to be printed are an RGB file to be sent to an RGB printer (epson
    9880). The issue is my paper profiles are not loading in the print dialoge.
    Im curious to know if CS6 is calling on this folder or if the profiles need
    to be loaded somewhere else.

  • Keeping the ICC Profile

    Hi,
    I need to load an image, perform some transformations to it and save it as JPEG. But I've noticed some color issues. Not perceptible when you look at it on the monitor screen, but perceptible when printing it an looking at the picture.
    What I noticed is that if an ICC profile is assigned to the image, then Java wil take it out.
    I've tried both JAI and Java 2D but both of them ripps the ICC pofile from the image.
    I also tried something as simple as loading an image an saving it as JPEG without any transformation but the ICC profile isn't there after saving it.
    The JAI code I'm using it is as follows:
            PlanarImage pi = JAI.create("fileload", imagePath);
            JAI.create("filestore", pi.getAsBufferedImage(), outPath, "jpeg");And the Java 2D is:
            Image image = ImageIO.read(new File(imagePath));
            int width = image.getWidth(null);
            int height = image.getHeight(null);
            double factor = 1.0;
            if ((width < MIN_WIDTH || width < MIN_HEIGHT)) {
                factor = MIN_WIDTH / (float) width;
            } else if (width > MAX_WIDTH || height > MAX_HEIGHT) {
                factor = MAX_WIDTH / (float) width;
            int newWidth = (int) (image.getWidth(null) * factor);
            int newHeight = (int) (image.getHeight(null) * factor);
            BufferedImage out = new BufferedImage(newWidth, newHeight,
                                                  BufferedImage.TYPE_INT_RGB);
            AffineTransform transform = new AffineTransform();
            transform.scale( ( float )factor, ( float )factor);
            Graphics2D g = out.createGraphics();
            g.drawImage(image, transform, null);
            FileOutputStream fileOut = new FileOutputStream( new File ( outPath ) );
            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder( fileOut );
            JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam( out );
            param.setQuality( 0.95f, true);
            encoder.setJPEGEncodeParam( param );
            encoder.encode( out );Can you point me what I'm doing wrong?
    Is there something I'm not considering?
    Does Java takes the ICC profile when loading the image or when saving it?
    Thanks!!!

    The most recent version I've seen was pretty clear in the documentation:
    "ICC profile, not implemented in this version of Photoshop"
    So the image you send needs to be sRGB
    Sandy

  • How can I view my profile information?

    This really isn't a huge deal but it really bothers me...on other versions of AIM and adium I can add myself to my buddy list to see when I'm away and to read my profile information. Is there anyway to add myself to my iChat buddy list? or is there anyway to view my profile/away message like other people would if I were on their buddy list? thank you!

    Only with another Buddy List using the same Server (I.e. an AIM Screen Name) or in another AIM Client such as AIM for Mac or AdiumX
    7:40 PM Saturday; July 19, 2008

  • Header information of any image file

    how to read the header information of any image file like swf,jpg,bmp.
    but i dont want to use the AWT package of java

    I don't know any other way. I used the following -
    public void paint(Graphics g){
         Toolkit kit = Toolkit.getDefaultToolkit();
         Image imageA = kit.getImage("c:\\\\javaproj\\javalab\\image.gif");
         g.drawImage(imageA, 555, 5, 50, 50, this);

  • How to convert sRGB images to CMYK retaining icc profiles?

    I was given the follwoing info. but not sure it answers fully - it still doesn't resolve the problem of converting to CMYK with the icc profile. I think this might be an option if the profile is loaded into the colour setting (colour settings under edit menu as oposed to convert to profile and its convert to profile I have been trying to action. Am I missing something straightforward?
    thanks!
    you can do batch process in Photoshop
    http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7427a.h tml
    -There is a fast and easy method to batch convert many RGB photographs to CMYK files by using Photoshop
    -Please open an image, then open the Action Tab (Window > Actions)
    -Please click 'Create new action' button, name the action in the text field and click the 'Record' button.
    -Now it is recording, so select 'Image > Mode > CMYK Color', then hit the 'Stop' button in the Action Tab.
    -The action is now created ready for the next step.
    -To batch convert a folder of images, just select 'File > Automate > Batch' and the following window opens.
    -Choose the 'Convert RGB to CMYK' action from the drop-down list, choose the source folder where your images are stored, then choose a destination folder where Photoshop will save the converted images.
    -Click the 'OK' button and the batch process will start. How fast will depend on the number of images that need converting.
    -The action you created will be stored, so you only need to perform a new batch process the next time you need to convert a batch of images.

    I think we may need a little more information to fully address your question or issue.  sRGB and CMYK are two very different color spaces, and converting from one to the other requires significant shifts in color.  Are you refering to a specific input or output icc profile?

  • Converting image data to given ICC Profile?

    I am considering using a pro printer to print my photos. On their site they provide ICC profiles for there printer which I can use to soft proof.
    The site states
    "Our Fuji 570 printer does not read embedded profiles, so the image data must be converted. This changes the data in the file to compensate for how our lab's machine actually prints colors."
    Can anyone tell me how I should export from Aperture that converts the image rather than embedding the profile?
    BTW I have a calibrated monitor and I am processing RAW files from my 400D.
    Thanks.

    Can anyone tell me how I should export from Aperture
    that converts the image rather than embedding the
    profile?
    Make a new export preset that uses the provided ICC profile. Aperture will then convert to the chosen profile on export.
    Ian

  • Image Processor: Include ICC Profile?

    I shot jpg sRGB. Should I include the ICC profile when extracting images? The images will be uploaded to zenfolio.com and made available for print sales. Looking for guidelines and what you folks do. Thank-you.

    Hi,
    Do you have Include ICC Profile checked at the bottom of the Image Processor dialog?

  • ICC profile for images

    I have a basic question about color profiles.
    I set the color profile Adobe RGB (1998) for PS by default.
    I work on images mostly and my question ist how to save JPG and other files, if with added ICC Adobe RGB (1998) or not?
    For example:
    My edited image will be published on the web. Has added color profile influence on displayed colors on the websites? Or will the computer screens display sRGB by default and the added color profile does not affect displayed colors?
    And for lab should be Adobe RGB (1998) OK, but I should inform me by lab staff, is not it?
    Thank you for explanation.

    Yes, absolutely the color space influences web display - SOMETIMES.  Internet Explorer ALWAYS assumes the color space is sRGB (the windows default for non-color-managed applications), while other browsers such as Safari will honor an embedded color profile.  Thus an image tagged with a color space other than sRGB will be INCONSISTENT between different browsers, and inconsistent is not what you want.
    Specifically, an Adobe RGB image will look dull and lifeless in Internet Explorer, with particularly muted reds.
    Do you *know* why you want to use Adobe RGB in the first place?
    If you're not sure, and if your primary output is web publishing, I might suggest setting your preferred working space to sRGB, as that is the one and only color profile that will yield the greatest consistency across all web browsers.  Working with sRGB space, by default, gives you more chance of being correct if you happen to use File - Save As instead of File - Save For Web & Devices.
    I also suggest checking the checkboxes that warn you if you're opening/pasting an image that isn't in your preferred color space.  That helps prevent mistakes.
    -Noel

Maybe you are looking for

  • Is it possible to change orientation from dual after creating folio?

    Somehow my orientation got converted to dual orientation and iit is only a vertical publication.  It went to my adboe content viewer on my iPad perfectly, but now when i try to view it on my ipad with it hooked into the computer it says orientation d

  • How to track changes made to a group owner for Distribution/Security Group in FIM 20101 R2?

    We have a requirement where we have to send a consolidated email to the new group owner which lists all the groups that are tagged to him/her. This requirement is needed so that the new group owner can be notified of the groups that he/she owns. Grou

  • ABAP: Modifying F110_PRENUM_CHCK form for check printing

    Hi All, I need to modify a standard form F110_PRENUM_CHCK for check printing in SAP Scripts according to specifications.Even in the box lengths and font size etc. May I know how to do that. Can any one provide information in this concern. Its very ur

  • Why is my iPhone 5 wifi so slow?

    I have an iPhone 5 through AT&T, and so does my dad and brother. My mom has an iPhone 4. I've recently noticed that ALL of the iPhone 5s get atrociously slow download speeds (<1Mbps download, >10Mbps upload, ~200ms ping). We pay for 50Mbps download a

  • Photoshop color problem on external monitor

    I'm using MacBook w/ OS X Snow Leopard, NEC LCD2490 monitor attached, both displays calibrated.  I found at some point that colors in Photoshop were WAY off on the NEC.  Images looked "correct" in Lightroom on the NEC, but when opened in PS I had mas