"rainbow colors" problem in reading JPEG's

Hi!
I am having a problems when trying to read jpeg-images.
This works:
            FileInputStream stream = new FileInputStream(imageFile);
            JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(stream);
            BufferedImage image = decoder.decodeAsBufferedImage();But I need to use this approach, which sometimes produces strange colors:
        javax.imageio.ImageReader reader = getReader("jpeg");
        reader.setInput(ImageIO.createImageInputStream(inputStream), true, true);
        ImageReadParam param = reader.getDefaultReadParam();
        BufferedImage image = reader.read(0, param);The problem is that colors in some images read look like rainbow colors. I found that images saved by Photoshop are ok, but other images (straight from cameras or edited edited with Nikon viewer) are not.
I think that this issue might be related to color model, but I do not know what to do. I really would like to get some help, even minor suggestions are wellcome.

This is windows specific. You can't do windows specific stuff using Java unless you use some native library.
My suggestion: forget about my documents and use your own directory. Most applications use a directory such as '.APPNAME'. For example netbeans uses a directory '.netbeans' . That way your app is cross platform.

Similar Messages

  • Why do external forms that I open (usually attached in an email) have all type of color problems. I usually cannot even read the document

    Why do external forms that I open (usually attached in an email) have all type of color problems. I usually cannot even read the document

    Hi,
    What is the exact name of the desktop app you have?  Is it "Acrobat Reader DC", "Acrobat Pro DC" or "Acrobat Standard DC"?
    (Previously, your question was posted to the wrong forum - the Reader/Acrobat DC mobile forum.)
    If you have the paid product ("Acrobat Pro DC" or "Acrobat Standard DC"), you can contact Adobe Customer Care.
    Contact Customer Care
    If you have the free product ("Acrobat Reader DC"), Adobe Customer Care will redirect you to the user forum like this one.  You just need to wait for someone (who is an experienced user but not necessarily an Adobe employee) to answer your question in the right user forum.
    You may also try looking for answers for the same or similar problems by Google search.

  • Color space conversion problem when importing JPEG's

    Hi,
    I'm currently playing with the trial version of LR. While importing JPEG's with different color spaces (sRGB and Adobe RGB) to LR I've noticed a strange effect: There is a small but noticable difference in color, depending if the JPEG was previously saved in AdobeRGB, or sRGB. All the images I've tested so far should not contain critical colors that exceed normal sRGB. When opened in CS2 both versions of a JPEG, AdobeRGB and sRGB, typically look perceptually identical, no matter if I leave the sRGB image to sRGB, or convert it to the working space (AdobeRGB). Also my color-managed image viewer behaves as it should. So I don't think it's a matter of the different color spaces.
    Looking at the imported images in LR I would say that the AdobeRGB image is correctly converted while the sRGB image suffers from a slight reddish cast, most noticable in skin tones. The effect is not as strong as if I would load the sRGB image into CS2 and skip color conversion to my working space (AdobeRGB).
    The sRGB versions of the JPEG's were obtained from the AdobeRGB JPEG's using CS2 for conversion.
    Anyone else here experienced a similar problem? Is this a bug in the xRGB-to-ProPhotoRGB conversion of LR, or a feature?
    /Steffen

    Hi Uli,
    thanks for pointing me to your thread. I followed the discussion with great interest. Actually, I think the effect I am describing here is of different nature and a LOT stronger, at least for the type of images I've tested.
    I did some more experiments yesterday with interesting results:
    1) When I export a processed RAW from LR to JPEG or PSD, no matter what Color Space (I tested AdobeRGB, sRGB and ProphotoRGB), and re-import those JPEG/PSD's to LR, they look absolutely identical to the RAW I started with. Also, at first glance, they look similar when opened in CS2, but only because I tested with color images. I can indeed see small differences when testing with B/W, as you described in your "Color management bug" thread.
    2) When I change the color space of an PSD or JPEG inside CS2 (I used the default setting 'relative colorimetric') and save it to JPEG and then import this JPEG to LR, colors are far off. The strength of this mostly reddish color cast depends on the color space of the imported JPEG, strongest for Prophoto, less strong for Adobe and sRGB. Interestingly, when I convert the color space inside CS2 and save the result to PSD, it will display correctly when imported in LR. Another interesting side effect: the thumbnails of LR-exported JPEG's in the "Open" dialogs of CS2 and LR (I guess those are not color-managed) show the typical color-flatness for the Adobe and even more the ProPhoto version. For the CS2-converted JPEG's, all thumbnails look just a colorful as the thumbnail of the sRGB version.
    3) Such an image which doesn't display correctly in LR will keep its color cast when exported again to a JPEG (not sure about PSD). So something goes wrong with the color conversion during the import of such CS2-converted images.
    My explanation so far is that CS2 uses a slightly different way of coding the colorspace information in the metadata of JPEG's which somehow prevents LR to recognise the color space correctly.
    Can you confirm this behaviour?
    Steffen

  • LIghtRoom color problem vs PhotoShop CS2 on Nikon RAW

    I recently bought Adobe Lightroom and I was surprised to notice some huge color differences compared to PhotoShop CS2.
    Im using Nikon D80 and shooting RAW. I have calibrated semi-pro monitor.
    The same RAW file opens in LightRoom pretty well until you get the rendering preview. Once the preview is done, the picture becomes desaturated in red and blue and has a green cast especially in the shadows with much lower contrast. If I use Edit in PhotoShop option, the picture becomes even worse (even more desaturated and greenish) when opens in PhotoShop. If I open the same RAW in PhotoShop directly (using the NEF plug-in, not CameraRaw!) everything is just fine. The picture looks as opened in Nikon Picture Project or as I saw it when I took the picture.
    After doing some research, I think that my problem relates to the way that Adobe Camera RAW, Bridge and LightRoom open a Nikon sRGB 4.0.0.3001 (D80) raw file. However, all the things being equal, PhotoShop CS2 (using the NEF plug-in) renders the same colors as Picture Project does (and what I saw on my camera and in reality). I also noticed that choosing sRGB in Camera Raw bring the things closer to the Picture Project colors but far from identical. Anyways, there is no way to change anything in LightRoom, outer than manually twicking all colors until I think it looks good. Which, I think Is very subjective and is different for every picture.
    Right now, my Creative Suite Color Settings is North America General Purpose 2 (synchronized for all CS applications) and no application asks me anything about changing the color profile when opening the file. I shoot (with D80) in raw, Normal camera mode (no saturation / contrast, color profile change). I opened the same file in all mentionned applications (LightRoom, CameraRaw from Bridge, PhotoShop and Picture Project) and save them as .jpeg (same size, dpi, etc.) without changing anything (no camera calibration in ACR or LR; no printer profile in PhotoShop). I sent the .jpegs to my local Costco and printed them on glossy paper. All of them printed the same way that they look on the screen. LR, ACR - desaturated on red&blue, color cast on green and low contrast, while great vivid colors and contrast from PhotoShop and Picture Project. For me it looks pretty much as Adobe applications convert Nikon sRGB into a very unappealing Adobe sRGB (and way different from what I saw in reality). I know this is very subjective; some people may argue that Nikon profile is too reddish and oversaturated. But I find the whole story rather unusual. They all work in the sRGB space and there shouldn't be any differences. I've done lot of testing with color profiles and replacing the Camera Raw plugin file format (common files) with Nicon plugins and vice-versa. But still the same result.
    I create a User Profile in LightRoom and I get pretty decent colors now, but when I want to edit the file in PhotoShop (from LightRoom) I get the same green and desaturated version.
    What do you think?

    >Regarding LR, what I'm looking here is a "factory made" solution; something that can give consistent results in the initial conversion (like Nikon plugin for PhotoShop, for e.g.)
    The problem with that conversion is that you cannot change it. In lightroom you change the actual conversion parameters, which gives you far more leeway and allows for far better conversions in the end. Currently (this will change with Lightroom 2.0 apparently) the only recourse you have if you prefer Nikon's colors is to shoot jpeg, or run your NEFs through capture and create 16-bit tiffs. This is just the way it is. A hammer gives a different result than a screwdriver.
    >It's hard for me to believe that Adobe has invested so much energy and resources in color profiling but it's unable to get nearly close to the Nikon raw colors.
    Nikon's colors are far from colorimetrically correct which you can see in many tests. Here is an example for the D300: http://www.imaging-resource.com/PRODS/D300/D300IMATEST.HTM It is off in the deep reds, the saturated blues, and the Olive-like colors. Profiling the camera does not help you get close to Nikon's colors, but it will get you closer to the ideal colors. I doubt it has been Adobe's goal to get close to the in-camera rendering with Lightroom upto 1.4. They profile all the cameras and make some value judgments on what is more important. Skin tones vs saturated colors etc just like Nikon does.
    Regarding getting close to camera colors, there is a trick that you can do to get close to the camera jpeg that involves the ACR calibration scripts. You do need PS CS3 though.
    >I find rather strange that apparently there is no way to get professional conversion. This is defying the main purpose of Color Profiling, I think.
    Why is Nikon's conversion professional and Adobe's not? They are both just interpretations of the sensor data. Adobe's is actually colorimetrically more correct in many cases. Colorimetrically correct often means boring unfortunately. This has to do with the fact that our eyes are not color measurement devices but that we have brains interpreting the data. To get pleasing results, Color Profiling does not help as much as you'd like. My issue with the in-camera or Nikon software approach is that it locks you down creatively to the
    creative choices the Nikon folks made. Now, be aware that in the Lightroom 2.0 forum the Adobe folks have hinted at major changes to the rendering engine that will bring colors closer to the vendor rendering. How they will do this is unknown right now.

  • How come when I view flash videos my videos stop, but the audio plays  and I see rainbow colored lines up and down the video.

    How come when I view flash videos my videos stop, but the audio plays  and I see rainbow colored lines up and down the video. I attached a image below.

    ATR, just to make sure you understand me, all my video clips in my folders appear as the first frame of the video clip when I view my folders as (small, medium, large)icons instead of lists, when saved as .avi files but when saved as .mp4 files, those icons display as a graphic icon of filmstrip with a musical note on it. I do have various other methods to open with (quick time, windows media, winamp or real player) but prefer real player because I like it's quick and easy trimmer that comes along with it, since so many of my videos are just pet antics where you need to clip off the boring beginning and ends of the video.
    I did go on a few of the icons and right clicked, Open With, and tried quick time and also Windows Media and it did nothing as far as how the file was saved for display, and they opened the same no matter which player I used...the actual video opens and plays right at it's first frame... but it's the way it is visually displayed in STORAGE that bugs me because it isn't immediately apparent to me what it is a video of (weddings, outside the house, pet antics)... it makes me have to actually title things and read titles where before I let it just be dates because I had the visual of that first frame as a reference. Obviously, this is a problem for unedited videos only, as anything I actually work with, I do give a title along with the date of the video.
    I also just realized this seems to be the way ALL videos that are wrapped in .mp4 are displayed, as my bloggie camera's videos appear the same way. Now I know why! My other videos display as .avi's so I see the frame. Puzzle solved. Guess I'll just have to learn to live with it, as it seems to be how things display with the various formats.
    Now I need to watch some tutorials to learn how this Premiere program works! It's all new to me, since this is the first time I've been able load any of my videos onto it. I haven't even been able to figure out how to trim on it yet!

  • Lightroom color cast question of JPEG image

    Lightroom color cast question of JPEG image
    Camera Canon MKII Color Matrix Adobe RGB
    Photoshop CS Color Setting Adobe RGB (1998)
    Lightroom 1.2 as new lightroom user I did not think that I needed to choose a color setting or color profile until I am ready to print my photos. I have not done any preset camera calibration.
    Link to my website with example photo http://www.basecampphotos.com/color.jpg
    My question is why is Lightroom displaying the images with a yellow color cast ? The image is a print screen from Lightroom on the left and Photoshop on the right The color cast problem can be seen in the white walls of the stairway. Also when viewing the image with Windows Picture and Fax viewer the walls are white as expected.
    Any ideas or suggestions as to why Lightroom is displaying the images with the yellow color cast or what I need to do to correct the issue ?
    Thanks
    Jim

    Almost definitely a corrupt monitor profile. Time and again this turns out to be the cause of such differences between PS and LR. You need to recalibrate the monitor or if you do not have a hardware calibrator, delete the profile from windows' monitor properties pane to test and then get a hardware calibrator.
    P.S since you are using adobeRGB jpegs, Windows picture and Fax viewers cannot give you the correct colors even on a calibrated monitor. Those are not color managed programs (I believe picture viewer finally is in Vista but definitely not in XP which you appear to be using). Also, PS has to be correctly set up to always preserve embedded profiles and to ask when you have profile mismatches, otherwise even PS will give incorrect color. Make sure to set this up in Edit>Color settings.
    P.S.2: Make sure you are not applying defaults in Lightroom to your images either on import or elsewhere. Sometimes people by accident define develop defaults that in this case might contain a white balance shift. Go to LR preferences and open the Presets tab. Here click on "Reset all default Develop settings" and make sure that only the auto grayscale checkbox is ticked. For images that it might have already happened to, make sure to hit the reset button.

  • Flash workspace color problem

    I have an Intel iMac runing OSX 10.4.11 I have installed CS3
    Premium. I am taking a Flash class at the JC . When I start up
    Flash CS3 the very first window (Flash icon and version #) is a
    bizare rainbow color, the welcome screen has to be turned off or it
    freezes the program, same with Dreamweaver. When I open a new
    project The pasteboard is dark blue and the stage is pink. If I try
    to change the background color on the stage with the property
    inspector I always get a different color than I pick. If I pick red
    I get blue, blue I get green, green I get red, white is pink.
    Objects drawn on the stage have the same problem but type always
    displays the color I pick. In the color picker if I type in FFFFFF
    or 255 255 2555 I get the pink color. The only color that displays
    properly is black.
    I have never seen this problem before nor can I find any
    reference to it. So is it a Flash bug an Intel iMac bug or what?
    All colors display correctly in Photoshop Illustrator,
    InDesign and Dreamweaver. I also get bizarre colors on flash text
    and buttons in Firefox but not in Safari.
    Where do I begin to solve this? I have reinstalled Flash CS3
    and it didn't help.
    Thanks,
    Stephen

    Try importing the Illustrator file.

  • Color problems between Lr5 and other software

    I can not see where to make adjustments to get the same tones between Lr and my other software: Photoshop, Irfanview, Windows Viewer ...
    My test conditions:
    My monitor is calibrated
    ... - Export Lr Jpeg quality 85% and also tests 16bit TIFF (sRGB, Adobe rgb and prophoto)
    ... - When exporting, I checked the "add to catalog" to view the same image in Lr.
    Conclusion: Other software gives almost the same tones (some small differences due to the chosen color space) and Lr gives a much warmer picture (Raw or treated Jgeg reimported in the catalog). Will it have a preference of Lr to settle?
    Note: the direct opening of RAW file in Photoshop with Camera Raw (same engine as Lr) without special settings, also gives a duller color different image, that directly Lr.
    What is the solution?

    In general, any difference between Lightroom and other color managed software is indicative of a corrupt monitor profile. No idea about Irfanview, but Lightroom, Photoshop and Windows Photo Viewer should all display identically.
    What they all do is convert from the source/document color space to the target color space, which for display is your monitor profile. The result should be identical - that is in fact the whole point of color management. But since the source space may be different the actual conversion itself may also be different. So one conversion may go bad but not others.
    A difference between Library and Develop will have the same explanation (different source spaces; Library is Adobe RGB while Develop is linear ProPhoto).
    It also happens that different applications react differently to a bad monitor profile. It may work in one application and fail in others.
    Any software that is not color managed will simply display in the native monitor color space, which can be anything under the sun, so you can just ignore and disregard that. It won't be accurate anyway.
    So the solution is to have a valid and healthy monitor profile. Then everything color managed will display identically (save for gamut differences, but in practice that only applies if you have a wide gamut monitor. With a standard monitor any source space will have equal or larger gamut than the monitor).
    Some calibration software has been known to not follow specifications strictly at all times, so check for updated software. Or the profile can simply have become corrupt. It happens. A way to test this is to set sRGB as default monitor profile in the OS - or Adobe RGB if you have a wide gamut monitor - and see if the problem clears.

  • Rainbow color vertical lines under strange circumstances

    So the lovely lady at the airport dropped my bag during security check in at the airport. The bag contained my brand new Mac Book pro. So I thought no big deal (the fall was not that bad and it was in a bag with protection) and it turns out that the screen has a small bump and again I thought no big deal! Here comes the strange part i turn on my mac book and vertical rainbow lines appear across the screen. I close the lid and open it again (screen turns off and on) and the color is restored. My mac will work as perfectly as soon as there is motion on the screen of anykind (videos playing, mose moving etc.) or if the camera is turned and the camera picture is displayed somewhere on the screen (facetime or photobooth). As soon as I display anything still on the computer its rainbow colors again. The bump is about half of mm in the lower right corner of the screen. I guess it can be a software issue (unlikely but possible) and what is left the wires on the screen or the screen itself. Anyone with similar experiences? How much would a repair cost (I would rather not change the whole screen).  But if it was the screen or the wires what difference would it make if anything is running on the screen or the screen is static?

    Problem resolves (if anyone cares). I just saved 1000 Euros on screen replacement using my pure briliance! The right corner bumb caused a damage to the Isight cable which was (when no app is using the camera) sending random electrical signals to the screen. By using a small script to disable Isight drivers the camera is totaly out of power and no electrical signals occure. The screen is super for hours now, I just enable the drivers before I use the camera again.

  • Rainbow colored pinwheel

    This may be a similar question as the previous, but I continually get a rainbow colored pinwheel during searches and there is a substantial delay before executing the command. What could my problem be?? I don't seen to get this problem with other search engines, only Safari. But I love to use Safari. Is this problem easily correctable??

    I had this happen to me earlier today and I finally had to "force quit" it.  I held the cursor on the Messenger icon and lifted it out of the dock and had to do this a couple of times and finally the force quit option came up.  Do not know what caused it.  Maybe we will both get a better answer, but hoping this may help in the meantime.

  • ADOBE PHOTOSHOP CS6 COLOR PROBLEMS

    hi i have a problem on adobe cs6, i am a photographer and i work heavily on my pictures, sometimes with graphic techniques(like lens flare, light leaks etc) and sometimes just with camera raw. i have this problem in the sense that i am satisfied with how the final image looks on my monitor but when i send these pictures to both my phones (AN HTC android and a blackberry q5) the images look over saturated, the colors are too contrasted and are too deep, everything looks like i over edited it and i dont understand. my laptop monitor supports 32-bit imaging and its set to that by default, but my picture mode in photoshop is set to 16-bit by default, please help as i dont know what to do, could it be my monitor thats rendering false colors? i read something about changing color spaces to between sRGB adobe RGB and ProPhoto RGB but i just dont understand anything, please help
    laptop specs:
    toshiba satellite a665-s6050
    intel core i3 350m @2.2ghz
    intel hd 3000 graphics card
    adobe photoshop cs6.1 with the latest camera raw

    What is the images’ Color Space and do you embed the profile when saving?
    In all probability your phones are simply not color managed.
    So while converting the images to sRGB might improve the situation the issue may be that you are expecting what’s pretty much impossible – that images appear identically in color managed applications and on non-color managed devices.

  • Macbook display color problems

    macbook, mac os 10.5.8 updated, display color problem. when i try to fix it by color sync. it says:
    /Library/Application Support/Adobe/Color/Profiles/DCDM_X'Y'Z'.icc
    Tag 'A2B1': Requiredtag is not present.
    Tag 'B2A1': Requiredtag is not present.
    Tag 'A2B2': Requiredtag is not present.
    Tag 'B2A2': Requiredtag is not present.
    Tag 'gamt': Requiredtag is not present.
    The file is locked. could not be fixed.
    /Library/Application Support/Adobe/Color/Profiles/DCI_P3.icc
    Tag 'A2B1': Requiredtag is not present.
    Tag 'B2A1': Requiredtag is not present.
    Tag 'A2B2': Requiredtag is not present.
    Tag 'B2A2': Requiredtag is not present.
    Tag 'gamt': Requiredtag is not present.
    The file is locked. could not be fixed.
    Repair done - 0 out of 2 profiles fixed.
    Kindly assist what to do.

    Welcome to Apple Discussions!
    Pictures would help. A good way to do this is to post them to a free photo sharing site like Flickr and then post a link.
    Also, you are in the original MBP section, and I think you need to post your question in the newer MBP section:
    http://discussions.apple.com/forum.jspa?forumID=1294
    Good luck!

  • ALV Download to Excel Column Colors Problem

    Hi Experts,
    I've encountered a problem in downloading records from ALV display to excel file.
    The file is downloaded SUCESSFULLY however. When I opened the downloaded file, some columns were filled up with color(yellow) and other fields are not.
    Do anyone have an idea why?

    I have 21 Columns columns. The first 16 columns are filled with yellow colors...

  • Colors in Adobe Reader 9.3.3

    Hello!
    I have a problem with colors in Adobe Reader 9.3.3 (I haven't checked earlier versions) on Win XP when displaying certain PDFs like the one in this link
    http://www.fileden.com/files/2010/8/11/2938999//RlColorDoc.pdf
    The colors on page 3 are off. This same problem does not occur with other PDF readers: Evince, Foxit and SumatraPDF. I think this is a bug and would like Adobe to investigate it.
    I am generating PDF files using open source toolkit ReportLab.
    Thanks and take care,
    Mikka

    Should have been memory leak - not "lead"!

  • Lightroom 4 color problem

    I imported tiff images into Lightroom 4 that were scanned by DigMyPics.com.  The color  of the images look good on the Windows 7 photo viewer.  It looks horrible in Lightroom 4.  My monitor is callibrated, the import develope setting is set to "none" , the box is unchecked "apply auto tone adjustments".   I think that the windows viewer is showing the accurate color of the scan and LR is not.  I don't think DigMyPics would send this awful color.  What could the issue be?     

    monitor NEC 2690 wuxi
    eye-one display 2
    Original message
    From: twenty_one
    To: [email protected]
    Received: 2/10/2013 12:30:42 PM
    Subject: lightroom 4 color problem
    Re: lightroom 4 color problem
    created by twenty_one in Photoshop Lightroom - View the full discussion
    Yes, that certainly looks like a problem with the Lightroom rendering. Skin tones and red in general is clearly off, while Windows Photo Viewer looks good.
    I'm almost certain this is a problem with the monitor profile. As troubleshooting, try to set sRGB as monitor profile (or Adobe RGB if your monitor is wide gamut), and see if the difference persists. But try to recalibrate first.
    What calibrator and what monitor?
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5062403#5062403
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5062403#5062403
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5062403#5062403. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Lightroom by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • Power connection isn't working

    I have a new power cord for my MacBook Pro.  I plug it into the laptop, it turns green for about one second, then goes to orange.  It doesn't show in the battery icon that the battery is charging, but if I turn the laptop over and look at the battery

  • How it is possible to modify the layout 1-N01

    The only OSS note that deals with a change of 1-N01 is based on ABAP program changing table's content directly.  Is there any other way except for ABAP to copy and edit the layout used in KBK6?

  • Can I change a key value?

    Is there some Processor that can be used to change a key value for a cache entry? Or do I have to do a get and a put with the new key? Thanks, Andrew

  • Configuration tab of MAX

    Hi all, do you all know how can I get to the configuration tab in MAX? Thanks. =)

  • How to draw an image onto a canvas3d?

    hi, i managed to draw onto a canvas 3d overwriting postRender() of canvas3d.   public void postRender()     J3DGraphics2D g = getGraphics2D();     //  TEST BEGINN       Image pic = this.getToolkit().createImage("Graphics" + File.separator + "start2.p