08-11-2021 09:57 AM
@WavePacket wrote:
@Hooovahh wrote:
Also you can probably load the image in a .Net Picturebox. Here is some code I posted for displaying an image and having it scale without needing custom code.
https://forums.ni.com/t5/LabVIEW/Read-multi-image-tiff/m-p/3580103#M1002365
I don't have a 32-bit BMP to test with, but it handles other alpha layer transparencies in PNG files just fine.
I just downloaded the image zip but when loading "Demo Load Image.vi" it said that it was missing "Current VIs Parent Directory_ogtk.vi". Any thoughts?
The _ogtk indicates it's part of the Open G toolkit, a free toolkit with some useful stuff in it available in VIPM.
08-11-2021 10:08 AM
@Hooovahh wrote:
Also you can probably load the image in a .Net Picturebox. Here is some code I posted for displaying an image and having it scale without needing custom code.
https://forums.ni.com/t5/LabVIEW/Read-multi-image-tiff/m-p/3580103#M1002365
I don't have a 32-bit BMP to test with, but it handles other alpha layer transparencies in PNG files just fine.
Seems to work with the "problem 32-bit bmp" that I had. Thanks for additional solution.
08-12-2021 04:54 PM
I had to look into this - so GIMP can create 32 bit BMP files
There are two flavors:
argba and xrgba
exporting an imported 24 bit image, not modified in gimp, in xrgba will do nothing. you can't export in argba.
if you modify the image in gimp via "add alpha channel" , you can now also export in argba.
Python's Pillow Library can read those bmp files, which than can be returned as a numpy array. and we can use LabViews python node to get tis numpy array of pixel values as an array in LabView, like this:
0# 24 bit | |
|
|
1# 32 bit xrgba | |
2# 32 bit argb (with alpha layer added in gimp manually) | |
code attached in LabView 2020 64bit, Python 3.7 installed globally