我使用下面的代码读取图像(JPG格式),我需要检查图像是不大于150像素×150个像素,并且小于25K,我应该怎么办呢?
PictureBox2.Image = Image.FromFile(.FileName)
If New FileInfo(.FileName).Length > 25 * 1024 Then ... 'More than 25KB'
Dim img = Image.FromFile(.FileName)
If img.Size.Width > 150 OrElse img.Size.Height > 150 Then ... 'More than 150x150'
Picturebox1.Image = img