VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Stretching alpha-bitmaps

Carles P.V.  (53 Submissions)   Graphics   Intermediate   Wed 3rd February 2021

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).

Rate Stretching alpha-bitmaps (28(28 Vote))

Download Stretching alpha-bitmaps

Stretching alpha-bitmaps Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters