Archive: Transparency in BgImage


Transparency in BgImage
I am trying to use BgImage to display background images. It's working fine, except the /TRANSPARENT switch doesn't seem to be working... my bmp's have a black background and I am using the command

BgImage::AddImage /NOUNLOAD /TRANSPARENT 0 0 0 $PLUGINSDIR\1.bmp

And then to display the image I use

BgImage::SetBg /NOUNLOAD $PLUGINSDIR\1.bmp
BgImage:Redraw /NOUNLOAD

However the image still displays with a black background. What am I doing wrong?

As an aside - what is the issue with using BgImage::SetBG in a section? I noticed in the readme it says not to do this, I was just wondering why...


Check color on your image is really black.


I already did - it is definitely black (RGB = 000)


Works correct on my comp with attached bitmap, black corners (both 256 and true color). Line in BgImage Example.nsi


BgImage::AddImage /NOUNLOAD /TRANSPARENT 0 0 0 "$EXEDIR\sw_off.bmp" 150 16

That image didn't work for me...it still had black corners...


What Windows are you running?

-Stu


I'm testing on XP SP2, but will be distributing a CD that will run on Win 2K upwards.


Just tested it on Windows XP Pro SP2 and I also have black around the picture.

-Stu


Bummer dude :(

Never mind - I'll just have to use solid bitmaps and work the colours so it looks OK.

I've managed to produce an install which does everything I need - something which many other (often expensive) packages didn't. So I don't think this matters all that much!


It works correct both on XP with SP1 and SP2. But NOT displays image at all with RLE compressed BMP (probably Wins bug).
May be it's time to re-work BgImage plug-in ? ;)


Seems like you're using the same image for both AddImage and SetBg. The background itself can not have transparent colors, only images drawn on it. Passing the /TRANSPARENT switch to AddImage will not affect the background set using SetBg.