Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66684

2D Picture Control Memory Growth

$
0
0

Okay so the 2D Picture data type is really a string.  It is a series of operations to draw an image basically.  So it is like putting a picture over top of a picture as you draw new things, and as a result the memory increases because all of the previous layers no longer able to be seen, are still in memory.

 

Attached is a quick example of this.  Run the VI then move the first slider back and forth.  Notice that the String Length continues to grow even if parts of the image are being covered up.

 

My question is this.  What is the easiest way to fix this issue?  I have a case where I have an image already drawn and it is fine, but I want to update just one section of it (like this VI).  But if I do so over and over the memory grows forever.  

 

I could redraw the whole picture every time but I want this to be quick and I'm unsure how big my picture will be, I just know to update a subset of the image based on the pixel location.  

 

I could also convert it to a pixmap and back which seems to work, but is this the right way to do this?  Thanks.


Viewing all articles
Browse latest Browse all 66684

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>