02-27-2023 04:19 AM
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
Solved! Go to Solution.
02-27-2023 12:04 PM
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"?
02-27-2023 12:41 PM
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
02-27-2023 12:54 PM - edited 02-27-2023 12:56 PM
@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
02-27-2023 02:05 PM
@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.
02-27-2023 03:23 PM
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.