Description: Some additions: AlphaBltStrecth and AlphaBlendStretch with and without interpolation (bilinear). Thanks to Ron van Tilburg for the fast 'integer maths' version of Peter Scale's 'Bilinear resizing' routine. And about this, a note: API AlphaBlend stretches using nearest-neighbour method (it only allows COLORONCOLOR for SetStretchBltMode function). This has a simple explanation: interpolation of alpha-bitmaps involves "pre-blending" (composition) alpha-pixels before rendering onto given DC. This complicates processing. This is supposed what GDI+ solves. Attached, there is a GDI+ test project for comparison purposes (compare flower contour-pixels of both tests; increase iterations for better appreciation and use AlphaBlendStretch function). __________________________________________________ Update #1. Some effects; packed in mDIB32Ext module: 'ConvertToGrey', 'BlendWithColor' and 'ChangeGlobalAlpha'. You can add your own ones. Remember pixel data is stored as ARGB (BGRA byte array).
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=60424&lngWId=1
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.