LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate bitmap image

Solved!
Go to solution

Good morning. I have a very simple labview program that takes a picture using IMAQdx and stores it in bitmap. My problem is that I need to add an "empty" bitmap to overwrite the image each time I want a new one. What is the easiest way to generate a bitmap image in the program so I don´t need to do this each time?

Thank you

0 Kudos
Message 1 of 6
(1,235 Views)

Sorry, I don't understand the problem and cannot open the attachment (using LV 2016). Can you post a snippet of your code? Where are you "adding an empty bitmap"?

0 Kudos
Message 2 of 6
(1,200 Views)

Of course.

As you can see in the picture, when I press the boolean, which has a latch when pressed mechanical action, I store a bitmap image using the IMAQ write file 2 sub VI. The thing is that I need to add a path to that sub VI that already contains a bitmap, so the new picture overwrite the old one. The ideal process would be for the VI to generate an independent and new bitmap, so I wouldn´t need to overwrite a file each time I want a new picture

0 Kudos
Message 3 of 6
(1,193 Views)
Solution
Accepted by topic author d_hunter13

@d_hunter13 wrote:

The ideal process would be for the VI to generate an independent and new bitmap, so I wouldn´t need to overwrite a file each time I want a new picture


 

try this.

 

Message 4 of 6
(1,188 Views)

@d_hunter13 wrote:

The thing is that I need to add a path to that sub VI that already contains a bitmap, so the new picture overwrite the old one. 


It's true that you do need to input a path, but it doesn't have to be of an existing file. You should be able to feed it a path for a file that hasn't been created yet, and assuming you have permissions to create a file there it will be created.

Message 5 of 6
(1,165 Views)

After reading, you can take the existing page and create a new name based on the first, e.g.

 

"image.png" -> "image_out.png"

 

these are simple string and path manipulations.

0 Kudos
Message 6 of 6
(1,155 Views)