Click to See Complete Forum and Search --> : StretchBlit distortion


Chip Lauria
May 14th, 1999, 09:34 AM
I am using the StretchBlit function to stretch a bitmap with 16777216 colors. When I 'shrink' the image, the image becomes distorted. I am hoping that I can adjust something , the Font or Pallette as an example, when the image is resized. Is their a way to resolve the distortion?

Chip

Abadon
May 14th, 1999, 10:19 AM
Lets see your code. Ive used StretchBit many times although i haven't used it on anything more than 256 colors. I do know this: Make sure that your destination RECT and source RECT are the same size, otherwise StretchBit will automaticlly adjust the source to fit the dest RECT, and the end result will be pixel degradation. My Best advice to you is make your own zooming algorithim.

Regards,
Abadon

Jaeyeon Lee
May 14th, 1999, 07:46 PM
Try to call SetStretchBltMode before you call StretchBitBlt.
In my case COLORONCOLOR mode worked best.
If you are not satisfied with the results, I agree with the other answer.
You'd better to use your own zooming scheme.

Chip Lauria
May 16th, 1999, 08:52 PM
Yes, Thank you. That works just fine. I just found this site and did not read previous postings. Thank you Jason T.

Chip

Jason Teagle
May 17th, 1999, 07:07 AM
Um... If you mean me, you're welcome.