I think this may help:
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As
Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long,
ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long,
ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As
Long, ByVal dwRop As Long) As Long
Private Sub Command1_Click()
Picture2.Cls
Picture1.Picture = LoadPicture("test.jpg")
StretchBlt Picture2.hdc, 0, 0, Picture2.Width, Picture2.Height,
Picture1.hdc, 0, 0, Picture1.Width, Picture1.Height, vbSrcCopy
SavePicture Picture2.Image, "C:test2.jpg"
End Sub
By the way, Do check that your mode is set to VBPixels. As all API's use Pixels as standard.
Happy Programming,
myMessage: Pray For Peace
neagle
| Fri, 09 Nov 2007 23:57:00 GMT |