View Single Post
  #50 (permalink)  
Old 12-12-2008, 03:48 PM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,068
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Version 1.3 now posted with a single new method in BitmapEx - AlphaBlend. This allows a specified portion of a source bitmap to be blended with a destination bitmap using a specified transparency value. Optionally a colour in the source bitmap may be specified as transparent and hence not blended with the destination. This needs .NET 2.0 but will work on both device and desktop.

Note that this does not cope with images such as PNGs and GIFs that have individual alpha values for each pixel. I had initially hoped to do this but it would only have been available on WM5.0 and later on the device. Implementing this would have required native calls to the Windows GDI on the device as the Compact Framework does not support this. In the end the grief involved in getting it working properly, mapping it sensibly into ImageLibEx for access from Basic4ppc and implementing a desktop compatible version was just too much effort to be regarded as fun so I rolled my own implementation with direct bitmap pixel manipulation . The upside is that this works identically on device and desktop and doesn't require WM5.0 or later and so runs on any device that can run .NET 2.0.
Reply With Quote