CImage::StretchBlt does not work!?
-
I have a problem with the CImage::StretchBlt Function! I made a little application, based on the "SimpleImage" -Sample Application from Microsoft. I tryed to stretch a picture to the screen (dynamic..) in the OnPaint() Function i have the following line: m_imgOriginal.StretchBlt(dc,0,0,m_imgOriginal.GetWidth()*dFactor, m_imgOriginal.GetHeight()*dFactor, SRCCOPY); dFactor is a Factor, calculated earlier. so the problem is, when dFactor is higher than 1 everithing looks fine, the picture is stretched properly. but when the factor is below 1, the picture looks very poor and distorted! is there a sloution to the problem? is it possible to make a CImage-Picture smaller at all without distorting it?? thanx for any input!!
-
I have a problem with the CImage::StretchBlt Function! I made a little application, based on the "SimpleImage" -Sample Application from Microsoft. I tryed to stretch a picture to the screen (dynamic..) in the OnPaint() Function i have the following line: m_imgOriginal.StretchBlt(dc,0,0,m_imgOriginal.GetWidth()*dFactor, m_imgOriginal.GetHeight()*dFactor, SRCCOPY); dFactor is a Factor, calculated earlier. so the problem is, when dFactor is higher than 1 everithing looks fine, the picture is stretched properly. but when the factor is below 1, the picture looks very poor and distorted! is there a sloution to the problem? is it possible to make a CImage-Picture smaller at all without distorting it?? thanx for any input!!
Try doing this , SetStretchBltMode(destDC,HALFTONE); where destDC is teh destination DC
-
Try doing this , SetStretchBltMode(destDC,HALFTONE); where destDC is teh destination DC
very cool! now it works! thanx a lot!