VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Stretching alpha-bitmaps

by Carles P.V. (53 Submissions)
Category: Graphics
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (28 Votes)

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

Download Stretching alpha-bitmaps

Download Stretching alpha-bitmaps (72 KB)

Stretching alpha-bitmaps Comments

No comments have been posted about Stretching alpha-bitmaps. Why not be the first to post a comment about Stretching alpha-bitmaps.

Post your comment

Subject:
Message:
0/1000 characters