LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving image as png

Hi, i have a simple question, at least i hope so...:

i tried to save an image in png file format. I tried several possibilities, but always its saying, that its not an image.

I used "IMAQ Writefile" for this, but the same problem occures with similar VI's. Drawing the image with "IMAQ winddraw" works though.

 

 

So i want to know, if someone could tell me the simplest way of how i can save an image?

 

THX

Sometimes my knowledge is just ... .... lol
0 Kudos
Message 1 of 11
(6,698 Views)

Hello,

 

I don't have LV 2010, could you post a screenshot of your code or repost it in LV 8.6 so I can try to help you.

 

Cheers


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 11
(6,687 Views)

here is a screenshot. Its the part before the saving.

"IMAQ Array to Image", "IMAQ Winddraw", "IMAQ WriteFile" are the Head VI's.

Sometimes my knowledge is just ... .... lol
0 Kudos
Message 3 of 11
(6,665 Views)

Hello,

 

Here is a little help.

I think you need to learn about the basics IMAQ functions, I suggest you have a look at some example (Help > Find Examples and then search for IMAQ).

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 11
(6,651 Views)

Hi THX at first for the help, but i realized with that, that the error is not really located in saving the image.

My option is quite similar, but it still tells me that "It's not a picture". So its maybe about the aqcuisition part.

I get an image from a camera. and display the image in the window i generated. As i saw from ur VI i have to use the array to save.

U used U8 to save. But the only possibility which i can display as an image with the camera is I16 (so im using this).

I think maybe thats the problem. If u have any suggestions on that, i'd be very grateful.

 

Greetings

Sometimes my knowledge is just ... .... lol
0 Kudos
Message 5 of 11
(6,619 Views)

Hmmm... I'm a bit confused now. If you can display the image properly there is no reason you can not save it.

Can you post a screen shot of the whole code and specify where the error "not an image" appears?

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 11
(6,612 Views)

i thought so too, but labview dont Smiley Sad

Sometimes my knowledge is just ... .... lol
0 Kudos
Message 7 of 11
(6,604 Views)

Oh... that's easy then, the function IMAQ dispose (that destroys the image) executes before you save the image.

 

To prevent that happening, link the output error connector of the save image VI to the input error terminal of the IMAQ dispose VI ; creating this dependency you are sure that the save will happen before the dispose.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 11
(6,596 Views)

no that would be too easy... aahhhm....lol.....

 

of course u are right, shame on me...

 

ok, then one last question:

Why is the saved picture not the same colourpalette

like the displayed but always grey?

 

Greetings

Sometimes my knowledge is just ... .... lol
0 Kudos
Message 9 of 11
(6,587 Views)

 


@xridder wrote:

Why is the saved picture not the same colourpalette like the displayed but always grey?

 

Greetings


Sorry, I never use color palettes... so I don't know.

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 10 of 11
(6,583 Views)