vb如何用API缩放图片???
来源:百度知道 编辑:UC知道 时间:2024/06/04 23:39:50
可用VB自带的方法缩放图片,不过失真较大,最好用双线性插值法。
普通缩放
Option Explicit
Private Enum Derection
LeftTop = 1
LeftBottom = 2
RightTop = 3
RightBottom = 4
End Enum
Dim Flag As Integer
Dim MouseDownFlag As Boolean
Dim MouseDownX As Single
Dim MouseDownY As Single
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
MouseDownFlag = True
MouseDownX = X
MouseDownY = Y
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Sing