Posted on 2002-07-15
I wonder if you guys can help me out in an area I'm not so familiar with.
I need a *very fast* WIN32 function (no MFC or other heavy library) to resize an HBITMAP and return an new image as a new HBITMAP.
The exisiting WIN32 function StrechBlt does the job but does it very with very bad quality.
I mainly need it to reduce the size of a small bitmap, not bigger than 200x200 pixels, the smaller bitmap must be in good visual quality but does no have to be perfect.
It has to be fast since I plan to use it in real time to animate a bitmap in several sizes which I can only create on the fly.
I allready found some code snippetns on a newsgroup and it worked fine but it did not support 32-bit bitmaps with alpha channel information.
To summarize, I need a function that is :
1. Very fast
2. Support several bit depths including 32-bit (alpha channel)
3. No external libraries, need it to be slim.
4. take source WIN32 HBITMAP and return HBITMAP
your help is greatly appreciated,