how to get img width,height,does it need bmp.clear?
Dim wh() As Int
wh=GetImgSize(File.DirInternal,"test.jpg")
MsgboxAsync("pic size=" & wh(0) & "," & wh(1),"")
why it's error?
Dim wh() As Int
wh=GetImgSize(File.DirInternal,"test.jpg")
MsgboxAsync("pic size=" & wh(0) & "," & wh(1),"")
why it's error?
GETIMG width/height:
Sub GetImgSize(imagePath As String,FileName As String) As Int()
If imagePath="" Then imagePath=File.DirInternal
Dim wh(1) As Int
If File.Exists(imagePath, FileName) Then
Dim bmp As Bitmap
bmp = LoadBitmap(imagePath, FileName)
If bmp.IsInitialized Then
wh(0)= bmp.Width
wh(1) =bmp.Height
' 释放 Bitmap 对象占用的内存
End If
End If
Return wh
End Sub