[解决办法] 我做的均值滤波,模板可变 Private Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long Private Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long Private Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long Private Type BITMAP bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As Long End Type Public Function max(x As Long, y As Long) As Long If x > y Then max = x Else max = y End If End Function Public Function min(x As Long, y As Long) As Long If x < y Then min = x Else min = y End If End Function
Private Sub Command1_Click() CommonDialog1.Filter = "图片(*.jpg) [解决办法] *.jpg [解决办法] bitmap(*.bmp)