LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing colors in a picture control

Hi all,

 

I'm running into some performance issues with the frequent updating of colors in a picture control. This is the method I'm currently using to update the colors.

The picture contains only two colors; the color of the icon, and the pane color to mimic transparency.

color change.png

 

is this method possibly too slow and could be the culprit of perfomance issues, and is there a better way of doing this?

 

Thanks

______________________________________________________________


______________________________________________________________
0 Kudos
Message 1 of 3
(2,723 Views)

Hi Gazebo,

 

a loop-less approach:

check.png

It's not perfect as it creates datacopies and has a coercion dot inside, but may provide ideas!

 

You may even use ReshapeArray to work with a 1D array (in the core of the routine), LabVIEW usually is faster then…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,694 Views)

you could get rid of one for loop and both the unflatten-pixmap.vi, if you used the image array from the image data cluster.

2015-05-05_replace-color.png

 

 

 

 

Message 3 of 3
(2,692 Views)