11-06-2008 06:08 PM - edited 11-06-2008 06:09 PM
And here you see how I load the pictures from skin path to the front panel picture controls.
11-07-2008 03:48 AM
I see there are no solutions/suggestions how to do that. Is it not possible?
Thank you, Eugen
11-07-2008 04:07 AM
You can code this yourself by blending the pixels of two images. For that, you need to:
The code is actually pretty simple, but I seem to remember some change in the way this worked between 7.x and 8.x, where 8.x seems to do this differently. I didn't pursue this, so I don't know if it's a bug.
Also, this won't work with Andrey's example, since the Get Panel Image method does not currently capture the background images in VIs.
11-07-2008 04:10 AM - edited 11-07-2008 04:11 AM
Hi, Eugen,
Sure its possible. Impossible is nothing...
But this may be a little bit complicated. In general you RGB image with transparensy organized by following way - four bytes ber pixel (Transparency, R, G, B).
What NI does is comparizon Transparency byte with threshold, in if transpareny less than threshold, then pixel marked as transparent. So, you have "binary" transparensy (in the fact result of comarizon added to the Mask array where each bit responcible for transparency.
What you needed is to analyse background under the picture and then modify colors of the image according to the transparensy byte.
This may be complicated if you have pattern under the picture control (like clouds in the given example). But this may be more easy for solid color background.
For example, if your backround is Black, and picture is Red, then you can just write Transparency value to the Red channel and then get this "semitransparency antializing effect":

Otherwise you should perform some calculation between picture color, transparency value and background color.
best regards,
Andrey.
11-07-2008 04:16 AM
Oh, thank you for suggestion, I will try it!
May be my background picture (800X600) will not be monocolor and I'll should extract only the field, where icon picture should be placed, but it's an another problem.
Eugen
11-07-2008 04:34 AM - edited 11-07-2008 04:39 AM
Ok, thank you for solutions. I will do that. I want/should to make my background picture always in black (the best color to drive in a car), else it's almost impossible (very difficult issue) to adapt the picture to the background.
Regards, Eugen
P.S. but if I do so, than I don't need transparency. I can draw my icons without transparency (no alpha channel) on the black background. Hmm...
11-10-2008 01:30 AM
thanks to everyone...
the problem was with the png file i've created using gimp...the background seems to be transparent, but when loaded in labview it produced a dark background...
thanks again to you all...
RENN