Archive: nsdialogs Image Transparency


nsdialogs Image Transparency
I am trying to get a BMP image on a custom nsdialogs page to have a transparent background. I have seen some suggestions of setting Magenta as the background but this hasn't worked for me.

I am calling the image using...


${NSD_CreateBitmap} 280 10 100 100 ""
Pop $image

; You should make sure the resource - local or http - is valid!
${NSD_SetImage} $image "$PLUGINSDIR\logo.bmp" $1


Anyone any ideas on how to make the background of the image transparent?

It is very difficult to have really *transparent* bmp pictures.
You need to set one color as mask [e.g. fuchsia 0xFF00FF] and then BitBlt whole picture bit after bit onto form's canvas...
There is much more theory behind it: http://www.codeproject.com/KB/graphi...itmapmask.aspx [This is only example, maybe try to google better example]

I suppose you should create some plugin in C++ which will perform all steps for you.
Also keep in mind that you will still see form behind the picture [usually BtnFace color] so you will not see desktop!

Easiest way is to use use .png/.gif images -> load it using OLE functions http://nsis.sourceforge.net/NsDialogs_SetImageOLE but there are also some problems.


hi, same problem here, i already tried SetImageOLE with no success, also found this plugin http://wiz0u.free.fr/prog/nsisSlideshow/#bottom which succesfuly loads bmp, jpeg, png, and some other formats, but again no transparency, with setimageole i have white background and with nsisslideshow plugin background is black


If the image has < 256 colors you can call LoadImage yourself with the system plugin and use the LR_LOADMAP3DCOLORS flag.


thx for info, and is any solutions for image with > 256 colors ?


Originally posted by sss123next
thx for info, and is any solutions for image with > 256 colors ?

thank for info, i will try, i do not like way with millions api calls .... )


i can't make even 256 colors image works..., which tool can create one ?


Paint.net probably can or you can grab a old copy of Paint Shop Pro, any editor out there probably supports it...


can someone make example for me please ?