Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function SetPixelV Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As LongPrivate Sub Command1_Click()
Picture2.Refresh
RltPic True
End SubSub RltPic(TrunLeft As Boolean) '
Dim X As Long
Dim Y As Long
Dim Hdc1 As Long
Dim Hdc2 As Long
With Picture1
Picture2.Width = .Height '交换长宽
Picture2.Height = .Width '交换长宽
Hdc1 = .hDC '获得句炳
Hdc2 = Picture2.hDC '获得句炳
If TrunLeft Then
For X = 0 To .ScaleWidth - 1
For Y = 0 To .ScaleHeight - 1
SetPixelV Hdc2, Y, .ScaleWidth - X, GetPixel(Hdc1, X, Y) '转置图像
Next
Next
Else
For X = 0 To .ScaleWidth - 1
For Y = 0 To .ScaleHeight - 1
SetPixelV Hdc2, .ScaleHeight - Y, X, GetPixel(Hdc1, X, Y) '转置图像
Next
Next
End If
End With
End Sub
图片翻转以后
用 SavePicture Picture2.Picture, "d:\ddd.gif" 保存不了图片
请问怎么解决?
Private Declare Function SetPixelV Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As LongPrivate Sub Command1_Click()
Picture2.Refresh
RltPic True
End SubSub RltPic(TrunLeft As Boolean) '
Dim X As Long
Dim Y As Long
Dim Hdc1 As Long
Dim Hdc2 As Long
With Picture1
Picture2.Width = .Height '交换长宽
Picture2.Height = .Width '交换长宽
Hdc1 = .hDC '获得句炳
Hdc2 = Picture2.hDC '获得句炳
If TrunLeft Then
For X = 0 To .ScaleWidth - 1
For Y = 0 To .ScaleHeight - 1
SetPixelV Hdc2, Y, .ScaleWidth - X, GetPixel(Hdc1, X, Y) '转置图像
Next
Next
Else
For X = 0 To .ScaleWidth - 1
For Y = 0 To .ScaleHeight - 1
SetPixelV Hdc2, .ScaleHeight - Y, X, GetPixel(Hdc1, X, Y) '转置图像
Next
Next
End If
End With
End Sub
图片翻转以后
用 SavePicture Picture2.Picture, "d:\ddd.gif" 保存不了图片
请问怎么解决?
Picture2.AutoRedraw = True
End Sub
SavePicture Picture2.picture, "d:\ddd.gif
http://community.csdn.net/Expert/topic/3262/3262150.xml?temp=5.283755E-02
http://community.csdn.net/Expert/topic/3312/3312140.xml?temp=.3141596
http://community.csdn.net/Expert/topic/3339/3339102.xml?temp=1.346987E-02
http://community.csdn.net/Expert/topic/3319/3319905.xml?temp=.4843866