简体   繁体   中英

How to stretch a bitmap image to some specific Co Ordinates using WIN32 core and VC++?

I just want to create a program which crops an image and sends the cropped image to some remote location.

I have loaded the image using BitBlt(). I dont know, How to uniformly display all the images ? all of same size. stretching is allowed. I have created a static control and now I want to display all the images inside this static control only...

I am able to display images using STM_SETIMAGE, but the problem is that images are not displayed uniformly. So I thought to resize the images before sending them to SendMessage(). I have tried BitBlt() and StretchBlt() but I dont know why nothing works in my code.

The detailed Code

Any Help, will be appreciated...

Thanks in advance,

You might want to try using StretchBlt() instead of BitBlt(). It allows you to specify the source and destination rectangles which will crop and stretch the image.

http://msdn.microsoft.com/en-us/library/dd145120(v=vs.85).aspx

如果您将图像内部存储为DIB,建议使用StretchDIBits ()。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM