From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Display Error

Hello,

    

     I was trying to display an image when the VI starts, and error 43 appeared. I wonder what could I do to get rid of the error. I attached the VI here. Thank you very much. 

 

     By the way, is it possible to display the picture in the dialogue box directly?

 

Regards,

Payne

0 Kudos
Message 1 of 4
(2,423 Views)

A smart thing to do when you have a bunch of code and one thing doesn't work is to write another VI with just the "one thing" code.  In your case, reading JPEG, unflattinging the PixMap, and drawing the unflattened PixMap (to a Picture Indicator).  Have you tried that?

 

I'd suggest reading the Help File for Unflatten PixMap, paying careful attention to which output you use.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,380 Views)

Hello Schor,

 

     Thanks for your reply. I tried to single it out and it still does not work. Here is the code. 

 

     I also found an example that the "Read JPEG  File VI" should be in front of the Draw Flattened Pixmap VI. http://digital.ni.com/public.nsf/allkb/02971A30F5D8FC6986256A0A004F11A0

 I followed the example but it still doesn't work. I would appreciate if you could give some suggestions. 

 

0 Kudos
Message 3 of 4
(2,364 Views)

I used your code, but replaced the file (C:\download.jpg) with the Sample Picture "Desert.jpg".  Here is the result:

Desert.png

 

P.S. -- why is this in a loop?  There's one picture, you render it once, display it once.  In fact, when I ran your code, I pushed the Stop button before I ran it ...

  

Bob Schor

0 Kudos
Message 4 of 4
(2,351 Views)