Skip to content
⌘ NSIS Forum Archive

Transparency in BgImage

11 posts

SeanB#

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...
Takhir#
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
Afrow UK#
Just tested it on Windows XP Pro SP2 and I also have black around the picture.

-Stu

Attachments

SeanB#
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!
Takhir#
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 ? 😉
kichik#
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.