- NSIS Discussion
- Transparency in BgImage
Archive: Transparency in BgImage
SeanB
21st December 2005 11:23 UTC
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
21st December 2005 12:29 UTC
Check color on your image is really black.
SeanB
21st December 2005 12:37 UTC
I already did - it is definitely black (RGB = 000)
Takhir
21st December 2005 12:50 UTC
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
SeanB
21st December 2005 13:37 UTC
That image didn't work for me...it still had black corners...
Afrow UK
21st December 2005 13:48 UTC
What Windows are you running?
-Stu
SeanB
21st December 2005 15:15 UTC
I'm testing on XP SP2, but will be distributing a CD that will run on Win 2K upwards.
Afrow UK
21st December 2005 17:46 UTC
Just tested it on Windows XP Pro SP2 and I also have black around the picture.
-Stu
SeanB
21st December 2005 18:18 UTC
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
21st December 2005 19:26 UTC
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
22nd December 2005 17:11 UTC
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.