English 中文(简体)
VB。净我怎么检查图像的大小和尺寸?
原标题:
  • 时间:2009-04-16 22:15:48
  •  标签:

我阅读在一个图像(jpg)使用下面的代码,我需要检查图像不超过150像素和150像素小于25 k,我该怎么办呢?

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
问题回答

暂无回答




相关问题
热门标签