Mark, the DIB suite is fairly stable. I don't expect it should have any major issues. PSC has the most current version & it won't be updated. This control was based off of that to begin with. The major differences between the two are pretty much enhancements to this control:
- reads more formats; writes to more formats
- handles a few more rarer GDI+ bugs
- based on GDI+ images, DIB suite based on DIBs/GDI but preferred GDI+ for PNG/TIFF
- more graphical options
- the DIB suite was written to support Win95 also; this is really not but can be
- the DIB suite has 1 major advantage over this control and that regards writing PNGs. This control uses GDI+ only; whereas, the suite has code to manually create PNG with various compression algos & more options
Now back to your issue. If your image does not contain significant levels of transparency, i.e., simple transparency mostly, you can mimic what I suggested with already built-in methods, and with very good results:
1. Use a picturebox instead of my control for that floating window. Properties include AutoRedraw=True, BorderStyle=0
2. From the control/image class containing your picture, call the RegionFromImage method to return a windows region
3. Apply that region to the picturebox. Do not destroy the region in this case
The 1st parameter of the RegionFromImage method can be adjusted to allow/remove more semi-transparent pixels. See the comments for that function. Those that are allowed will not be semitransparent; they will be converted to 100% opaque. That parameter, whatever setting, ensures variable transparency is treated as simple transparency.
' api you'll need
Private Declare Function SetWindowRgn Lib "user32.dll" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
' shaping the picturebox
:: draw the image onto the picturebox or put my control in the picturebox at 0,0 coords, then...
SetWindowRgn Picture1.hWnd, AlphaImgCtl1.Picture.RegionFromImage(), True
' Image must not be resized. If it must be resized; you'll need to save it first to the new size.
' RegionFromImage uses actual size image only
' should you need to restore picturebox
SetWindowRgn Picture1.hWnd, 0&, True
Apologize a bit. Should've thought about this solution earlier; but honestly, I just forgot I added that method to the control a couple versions ago.