Color and depth lost when reading PNG

Hello,
I'm using IMAQ Read Image And Vision Info.vi to read a PNG saved with IMAQ Write Image And Vision Info.vi. The saved image is 24 bits, color. When I open the image and display it using an image control, it shows up as an 8-bit grayscale. How do I get it to open in color?
Thanks.

Are you passing a 24-bit color image into the image terminal of this VI? Most likely, you have the default Grayscale (U8) Image type for the initialization of the image that you feed into the IMAQ Read Image And Vision Info.vi. It is a terminal on the bottom of the IMAQ Create vi.
Hope that this helps,
Bob
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected]

Similar Messages

  • Saving Color and Depth data as png to filestream

    I try to save both color and depth data to separate files as PNGs using PngBitmapEncoder but I get much less depth frames saved than color.
    If I save color as Jpeg with JpegBitmapEncoder and depth as PNG using PngBitmapEncoder I get the same amount of frames from both streams.
    Can anyone explain me why?
    private void myKinectSensor_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e)
    using (ColorImageFrame color = e.OpenColorImageFrame())
    if (color != null)
    colorbits = new byte[color.PixelDataLength];
    color.CopyPixelDataTo(colorbits);
    PngBitmapEncoder enc = new PngBitmapEncoder();
    enc.Frames.Add(BitmapFrame.Create(BitmapSource.Create(color.Width, color.Height, 96, 96, PixelFormats.Bgr32, null, colorbits, color.Width * color.BytesPerPixel)));
    if (StartSavingFrames)
    string temppath = System.IO.Path.Combine(@"../output/kinect1/color/", colorcnt.ToString() + ".jpeg");
    FileStream fs = new FileStream(temppath, FileMode.Create);
    enc.Save(fs);
    fs.Close();
    fs = null;
    colorcnt++;
    else { colorcnt = 0; }
    private void myKinectSensor_DepthFrameReady(object sender, DepthImageFrameReadyEventArgs e)
    using (DepthImageFrame depth = e.OpenDepthImageFrame())
    if (depth != null)
    frame = new short[depth.PixelDataLength];
    depth.CopyPixelDataTo(frame);
    for (int i = 0; i < depth.PixelDataLength; i++)
    frame[i] = (short)(((ushort)frame[i]) >> 3);
    PngBitmapEncoder enc = new PngBitmapEncoder();
    enc.Frames.Add(BitmapFrame.Create(BitmapSource.Create(depth.Width, depth.Height, 96, 96, PixelFormats.Gray16, null, frame, depth.Width * depth.BytesPerPixel)));
    if (StartSavingFrames)
    string temppath = System.IO.Path.Combine(@"../output/kinect1/depth/", cnt.ToString() + ".png");
    FileStream fs = new FileStream(temppath, FileMode.Create);
    enc.Save(fs);
    fs.Close();
    fs = null;
    cnt++;
    else { cnt = 0; }

    performance of the write operations and the operations of the system at the time you are calling them. You need to ensure your functions are returning and releasing(disposing) of the frames faster than the callback times. When you hold onto data to
    long, that just prevents your application from getting new data.
    Have a look at the coordinate mapping sample from the toolkit for a way to copy both the depth and color at the same time. From there you need to create a new thread to save that data since write speeds are very slow.
    Carmine Sirignano - MSFT

  • Camera raw 8.7 color and contrast shifts when file opened in ps 6

    camera raw 8.7 color and contrast shifts when file opened in ps 6

    Thanks ssprengel for the suggestions and running a side by side yourself. I went through all my settings and applied your suggestions and did a side by side each time. I even uninstalled the entire creative suite on my system then reinstalled and updated and I still get the same outcome. It was fine yesterday with the previous version of ACR. It seems like the updated version is not showing the image preview in any color space. When I switch the color space in the workflow options the histogram changes but it doesn't seem to affect the preview window. And yes the preview button was checked on it was just when I was using the screen grab tool in windows it took focus away from the application so that is why the settings appear grayed out. I have attached more screen grabs below illustrating all my settings. Also here is some system info if anyone out there has a similar setup and would be willing to test.
    Adobe Photoshop Version: 13.0.1 (13.0.1.3 20131024.r.34 2013/10/24:21:00:00) x64
    Operating System: Windows 7 64-bit
    Version: 6.1 Service Pack 1

  • Slight Color and Quality Shift when viewing RAW files for first time in Library Module.

    Hello,
    I have been shooting RAW for a while and have notice that after I import the images and then start to view them in the Library Module I will see a slight color and quality shift - almost looks like a white balance shift but not quite.   I was thinking that perhaps there was some automatic preset being applied but I don't have any presets at all.
    I am shooting with a Canon 1DX as well as 7D.  I have not checked to see if I get this situation with the 7D, but I know for sure that I get it with the 1DX.
    Today I was reviewing some images in Bridge and decided to open one of them in Camera RAW.   At that time I discovered that the camera's Image Style Settings were available, Faithful, Standard, Portrait, etc.  I noticed that the images did not have one of the camera styles applied to them but rather the Adobe Standard Style. At that point from within RAW I selected one of the camera's styles and bingo thats the kind of shift I am seeing when I first view an image in LR4 Library.
    So as far as I can tell the RAW images are getting the Adobe Standard style applied in LR.   I have no idea if this is a default behavior of if I have done something to cause it.  I'm also thinking that perhaps LR does not necessarily apply the Camera's Styles automatically even though the particular style has been set in the camera -- perhaps is not imported as part of the metadata during the import and thus defaults to the Adobe Standard.
    I guess what I need to know is a few things and I hope someone can educate this newbie! 
    1. Should I expect LR4 to apply the Style as set from the camera automatically or not at all?
    2. Can I prevent LR from applying the Adobe Standard Style and apply no style?
    3. Can I cause LR to apply the Style as set in the camera for the particular image to be appied automatically upon import?
    Thank you for any guidenace you can offer.  Of course if you need additional information or clarification please let me know.
    Scott

    That sort of describes it and may be exactly what is happening.  I have a shoot tonight and will pay closer attention to the process and behavior when I import.
    It is the full image that I see the shift on though.  Its not that the thumbnail and the full size image look different.  It the full size image looking one way and then shifting in front of my eyes.   
    What is frustrating is that I typically find that the image before the shift is better than what appears after the shift, so I find myself always chasing to get back to where it was and because its gone I'm chasing an invisible ideal, so to speak.   Ahhh...isnt that the life of a photographer though!
    It seems like its the last step in the render process -- if I could just figure out what it is and stop it I could finally figure out if I really care or not.  Its just so quick its tough to tell if indeed the first appearance is better.
    I'll feedback some more information when I get a better handle on this.
    Thanks for the reference.

  • Chose white color and obtain purple when opening again the color window

    Hi,
    I have installed fresh new Illustrator CC 2014
    I have noticed a great  bug
    I create a vector shape, I fill it with white color . All is Ok
    Now, i click in the color explorer in order to change the white color and it show me a purple color !!
    What's happen ??

    I start with white color ! and when i open my window color, it's purple CMJN code !
    So i replace CMJN code purple by CMJN code white. I close the window and when i open once more, it's again the purple code !!!

  • Color and size changed when upgraded to photoshop CS5

    Hi, I created a flyer in an older version of photoshop and when I upgraded to CS5 the colors and print size changed. This is particularly distirbing b/c this is a flyer/advertisment for work that was almost at the final stage. They are quite small changes, but changes that need to be corrected just the same. The colors look different (duller) on the screen and in print while the size became smaller when I print (to pdf and the printer). My print settings are the same as before as are my color settings (CMYK). I am fairly new at creating flyers in photoshop, so I am hoping this is a simple fix. Thanks.

    Are you 100% certain you are using the same color profiles throughout? That print size issue might be specific to your printer driver... CS5 has a completely rewritten print handling which may not correctly cooperate with your printer driver or conversely the driver might need to be updated...
    Mylenium

  • Embedded Color Profile is Lost When Content is Published to Web or Dragging Image Window on Desktop

    Hello, Everyone.  I have a question that I have struggled to crack on my own to no avail.  I hope someone here can help.
    I am trying to publish some images to the web using color corrected monitors, RAW format, and a color checker passport to create a perfeect color profile.  Here are the technical details and my workflow.
    Camera: Canon Rebel EOS Xsi
    Format: RAW + L
    Color Space: sRGB
    Color Checker: X-Rite ColorChecker Passport
    Monitor Calibrator: Spyder4 Pro, fully updated software
    Computer: Lenovo T420 ThinkPad
    Second monitor: Samsung LED SyncMaster SA350 (NVIDIA)
    Photoshop: v12.1 x64 (CS5.5)
    Photoshop Color Settings: Custom North America Web/Internet
    RGB: sRGB IEC61966-2.1
    CMYK: U.S. Web Coated (SWOP) v2
    Gray: Gray GAmma 2.2
    Spot: Dot Grain 20%
    Policies
    RGB: Preserve Embedded Profiles
    CMYK: Preserve Embedded Profiles
    Gray: Preserve Embedded Profiles
    After importing the image into Photoshop, I make sure the RAW space is set to sRGB IEC6 1966-2.1
    Use the eyedropper to select a neutral color one step away from pure white on the RAW image of the color checker, create and set the custom white balance.
    set the white balance
    Export the image as a DNG
    Load the DNG into the X-Rite ColorChecker Passport software to create a color profile
    Back to Photoshop
    Open the RAW file
    Set the white balance to the custom profile created above
    Set the color profile created with X-Rite
    Open the color-corrected image in Photoshop (see color setting above)
    Save as JPEG
    Publish
    First, everything seems to go great throughout this entire process, until I see the image on the Web: LINK.  Once published, the image has a very noticible golden-yellow tint to it.  The color-corrected image looks great on both color-calibrated monitors, in RAW and JPEG.  Absolutely perfect.  After noticing the ugly yellow tint in the image I posted to the Web, however, I became aware of a couple more weird things.
    1) When the JPEG was open in Photoshop and I moved the window that contained the image around on my second monitor, the image immediately took on that golden-yellow tint: you can see a screen shot of the color corrected image on my Samsung (bottom) and the yellow version of the same image created when I drag the window around on the Samsung (top) HERE.
    2) When opening the X-Rite software, I got a warning saying that the laptop monitor had been calibrated, but that the Samsung had not.  I got this error even if I calibrated the Samsung monitor right before using X-Rite.  Also, the monitor is definitely calibrated, because the images look great, and the colors match what I see on the laptop.
    3) Recently, I noticed that when waking my computer from sleep, the Samsung monitor no longer holds its Datacolor (Spyder4) calibration.
    I thought the problem I was having might be due to the monitor, for the reasons stated above.  However, I later noticed that when I open the color-corrected JPEG with the default Windows image viewer, it retains the color correction settings.  The image looks fantastic, and doesn't lose it's color profile when I drag the window around.  Also, there seems to be less color loss in the Word documents and PDFs I included this image in: LINK.
    I checked this with several more images, and the results are the exact same.  I scoured the Web as best I could, but my problem seems to be pretty unique.  Does anyone have an idea what might be causing this?
    Thank you!

    Thank you, twenty_one, for taking the time to read my post and put up a reply.  I am going to rebuild my question and post it again here.  But first, to answer some of your points:
    1. A raw file has no color space, until it's opened into one in the raw converter. So this is controlled in ACR, not the camera.
    I just wanted to be as thorough as possible.  One of the steps I took was to set the Color Space setting in my camera to sRGB:
    2. White balance has no bearing whatsoever on camera profiles. A profile is not for white balancing, it's to account for the spectral distribution of the light, which is something else. You make the profile and assign it in ACR, then you white balance for processing. 
    I know.  I wasn't talking about white balance in my camera.  I set the white balance here:
    I grabbed the color for setting the WB here:
    3. If you get a message about monitor calibration upon opening the camera calibration software, something is seriously confused. The two have nothing to do with each other. No relation whatsoever. 
    Camera calibration software?
    4. A corrupted monitor profile will only show up in Photoshop and other color managed software. Other applications that are not color managed will not use the profile and are not affected. So find out which apps are and which aren't before drawing any conclusions.
    Agreed.  That's partly what I am trying to get help with.
    5. Your links don't work, and in any case clicking on links is something most people including myself dislike. It's much better to insert screenshots in the post, by using the camera icon in the reply box.
    I'm new to this forum, so this is helpful to know.  This image shows the color-corrected image (bottom) on my Samsung.  It looks exactly the same in the same window on my laptop monitor.  When I move that window around on my Samsung screen, it turns gold (top).  The image, when posted to the web, looks *similar* to that gold color.
    So let's say I only use Photoshop on my laptop, which is not displaying any colors.  Do you think the golden hue problem will go away?

  • NTFS data lost when read on Mac OS X Mountain Lion

    I am having external disk with NTFS and using Mac OS X Mountain Lion to work with the data inside the disk.
    However I encountered problems when working with those data in Mac, somehow the data inside several directories on NTFS disk are lost.
    The data lost was not because it was deleted, the data just lost directly when it was opened on the mac.
    From the Mac's Finder, it is said that the size of the directories were zero bytes.
    When I connected the disk to windows machine after that then it keep showing 0 byte. The data was lost permanently just after I opened it from Mac - the data was there previously before I openned it in Mac, but right now it's gone.
    It's happened two times on different NTFS disks, it seems that Mac OS X deleted those files on NTFS disks.
    Has anyone here encounterred the same problems like I did?
    How to prevent it from deleting NTFS data again?
    Is there any way how to recover those lost NTFS data?

    Data Recovery – Best
    Data Recovery – Disk Drill
    Data Recovery – Data Rescue
    Data Recovery – File Salvage
    Data Recovery – Stellar Phoenix
    Data Recovery - uFlysoft
    Data Recovery - Recovering Deleted Files
    Data Recovery - Recovering Deleted Files (2)

  • Character '\' is lost when reading a String from a property file.

    Hi all,
    I have encrypted information inside a property file, but when loading properties in my program, the String object used to store the value is changed by the lost of all �\� characters
    # EIS password saved in the property file
    password=WPLqQE0DlVF8Sg\=\=
    #Value loaded in my String object
    WPLqQE0DlVF8Sg==
    Why is this happening? I use java.util.Properties java class to store and load my properties, and it is supposed to do it with the same encoding (ISO 8859-1).
    Please, can someone explain me why this happened and how to solve it?
    Best regards.

          public static void main(String[] args) throws IOException {
               OutputStream props = new FileOutputStream("test.properties");
               Properties p = new Properties();
               p.put("password", "pass=word#is!dumb");
               p.put("user", "    I am a Dummy");
               p.store(props, "Java forum demo props file");
               props.close();
               /* Properties file after store
                * user=\    I am a Dummy
                * password=pass\=word\#is\!dumb
               Properties post = new Properties();
               post.load(new FileInputStream("test.properties"));
               for(Iterator it = post.entrySet().iterator(); it.hasNext();)
                System.out.println(it.next());
                * After load from test.properties
                * user=    I am a Dummy
                * password=pass=word#is!dumb
          }Notice that the special chars are only in the file, not actually in the props. If you think otherwise, I don't know what to say. The \ is a special character that is used to escape other special chars, including itself. You can't create a string in java containing only one backslash, as java assumes the next char is being escaped. when you create a string in Java with one backslash, you have to have 2 backslashes. If you are storing data in the property file using something other than store, than you need to ensure that you are escaping all special charachters that the store method does
    ~Tim

  • How do I restore address book and emails lost when I upgraded to current version?

    First, I am not a tech savvy guy, so please be patient with me.
    Last Friday, my email stopped. Message on the screen said "Inbox is full. Delete unwanted messages to make room" etc.
    First, I went to Help/Tools and upgraded to the newest version. That did not solve the problem.
    I couldn't find anything on Mozilla/Thunderbird site that seemed to fit the problem, so I contacted my service provider, XMission.
    After trying several things, and guiding me through several things that I did not really understand (see 1st line above), he then guided me to the Mozilla web site and had me download a new version from there. (His explanation was that probably there was something in my longtime Mozilla/Thunderbird installation that had become corrupted). So I did that.
    We finished about 2 AM, and the "Inbox" appeared to be working, and all of a sudden email from last Friday through to early this morning appeared in the inbox. So I thought the problem was solved.
    Alas, this morning, when I got looking through things, I discover that my address book is gone, and all my archive files, going back several years. I contacted XMission again, and they told me I had been contact Mozilla.

    yeah, about time you stopped following their bad advice anyway. The fix was originally simple. Now not so much.
    So 20 question time. I am asking each question for a reason. please answer them all.
    In the windows start menu... type %appdata%\thunderbird\profiles and press enter
    In the explorer windows that opens, what folders are shown? (Names please)
    On Thunderbirds help menu select troubleshooting information and click the show folder against profiles.
    What folder does explorer open into this time? (it will be one of those you listed before I hope.)
    Is there only a few incoming emails in your inbox in the mail profile your currently using? (I hope so.)

  • Play sound in specified duration and desired file when reading data with VISA functions ?

    Hi.
    I read data with VISA read function and then I use functions like multiple for showing data on Chart. every thing is OK.
    now I want play a specified sound (like a 3s song in my desired folder) when signal amplitude cross over from specified value. then after desired time, it will be wait for new cross over from specified value and this procedure repeat again until I stop the program. 
    Data comes from MCU and it doesn't stop when system play sound and when system play sound, incoming data for this part (play sound) will be ignore them until specified expired.
    I use this VI for reading data and mentioned part which is sound part is empty and I don't know what I must done ?
    altougth I use another while loop for sound apart because I want save CPU time.
    Thanks.
    Solved!
    Go to Solution.

    I would recommend making the data type of the notifier a cluster that contains a path and a numeric (double).  The path tells the player which file to play.  The numeric is the duration.
    Now for a slightly complicated, but really neat, way to stop your second loop.  Do not use a second notifier.  Instead, send the normal notification but use Not A Path for the path in the cluster.  Your second loop can do a check for the Not A Path and stop when that is recieved.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Date and Time lost when upgraded to PSA/SE 3.0

    I have upgraded from Photoshop Album Starter Edition 2.0 to 3.0 - my tags seem to be intact, but the dates on all of the photos reverted back to January 1, 2003 regardless when I took them. There was no warning about this happening, no recommendation to back up the files in a way to save the date info. I had spent hours posting corrected dates into many of my photos when accessed by PSA/SE 2.0 only to have all that work dissappear once the upgrade was installed. I liked being able to search for photos based on approximate date taken. I realize there is not likely any quick way to restore the dates, but if there is I'd sure like to know.

    When updating I just followed the prompts. I did not choose to cusom install anything. I let the software do all the work.
    A large number of my photos are not in the "Adobe" file and must be reconnected as well. I was hoping that once reconnected the date would return, but, sadly, I was mistaken. As I had mentioned when I first installed 2.0 I had to change the dates and times of all my pre - existing photos. They had also defaulted to January 1, 2003. Now I'm back to square one with them all.

  • IPhoto 4.0.3 color and Brightness problems when printing out photos.

    In addition to my previous question, I forgot to mention that opening the iPhoto 4 JPEG photos in Photoshop also import as dark and reddish tinted. Help?

    This color management thing gets pretty complicated. To get the best results you have to synch monitor calibration with camera and print settings.
    There is also the difference between additive (light)and subtractive (pigment- ink) color. The monitor starts with black - 0%, adds red, green and blue to a pixel (picture element) and gets white 100%. A printer starts with white (paper) and when all the colors are added gets black - this is different then using true black ink.
    So by their nature the display on the monitor and print are quite different. Typically monitors are set to maximum brightness and contrast. A photo appears light and less than saturated. Printing at BEST PHOTO lays on lots of ink dpi. So the print is going to be saturated and darker than the monitor image - for most users.
    Professionals go to great effort to calibrate and control the effect of printing versus display. For us users it takes experimenting and experience to be able to judge the difference between display and output (print).
    I have found that using Adobe RGB settings the photo as seen in PhotoShop is very close to the high quality print PhotoShop produces. That is why I do most adjustments in PhotoShop and use iPhoto for cropping and rotating pictures for the web or email.
    The key to getting the best print in iPhoto is your printers color management settings.
    Peter

  • Color and Contrast Change when opening pictures in PhotoshopCS3

    I just calibrated my monitor { Mac book 15 inch Pro}  using Display Calibrator assistant. I used the Expert mode. I normally had it Calibrated with HUEY PRO. I was not liking my print results with Huey. So I matched the print to the new calibration using Display Calibrator. Now that the pictures match. I go to open one in Photoshop CS3 and the picture darkens, more contrast, and high in Saturation. I can view the picture in photoshop and see it in Bridge at the same time and they are dramatically different. I have all my color spaces set in photoshop the right way using the SRGB for working and that is the format I Shoot in. I have not changed anything except the new monitor calibration. Any one know what could be happening? THanks!!!

    Now that the pictures match.
    Which pictures match?
    Are the profiles embedded in the images?
    What are the Color Management Policies?

  • The masthead on our letterhead (Word) is a jpeg image and gets lost when shared

    Rhe masthead on our letterhead (Word) is a jpeg image; the letterhead is a Word document.  When we convert a letter in Word to Acrobat Standard XI and then share it, it is during the sharing when we lose the masthead but the text in the letter remains.  I do not want to lose the masthead.  How do I preserve it? Thank you.

    Check this in Preferences:

Maybe you are looking for

  • InDesign CS2 won't open: error msg states "Please install the MetaData plug-in and restart"

    I'm unable to open my InDesign CS2 program, and am wondering if anyone has any suggestions for me. When I try to open it, I get an error message stating: "Cannot load Adobe InDesign CS2 because it requires MetaData. Please install the MetaData plug-i

  • How do i use my webcam and photo on my dktp4/500

    is there a cd or owners manul for my dktp hp 4/500, and if so where my i get it. i need to know how to use my webcam, and photos to put them on my comp.

  • Head Spinning on Creating a Apple Lossless and AAC libraries

    I am contemplating archiving all my CDs to an Applelossless library using iTunes. Before doing so, I have some questions. We are in a WIN XP environment. 1) How do I convert an Apple Lossless album to AAC format with all the album info in tack to a s

  • Massive / Snow Leopard

    Just FYI, NI's Massive seems to have problems under Snow Leopard. When manually quitting Logic from any project using Massive, the app either hangs or complains that the 'Massive plugin quit unexpectedly'. Quick look at the details would suggest some

  • Time duration formula help

    Post Author: ztruelove CA Forum: Formula I am needing to run a monthly report that shows how many hours our company cars have been "checked out" for that particular month. Each record has a "check out date" field in the format YYYY-MM-DD and a "check