vb.net 修改图片大小

来源:互联网 发布:手机质量检测软件 编辑:程序博客网 时间:2024/05/06 06:24
 

 Dim cmicImg As System.Drawing.Image
 Dim mWidth, mHeight As Integer
 cmicImg = System.Drawing.Image.FromFile("c:\temp.bmp ")         '读入图片     
 '变化大小     
  'mWidth = CInt(cmicImg.Width / 2)
  'mHeight = CInt(cmicImg.Height / 2)

   mWidth = CInt(384)
   mHeight = CInt(512)
  '存图片     
  Dim cmicImgSave As New System.Drawing.Bitmap(cmicImg, mWidth, mHeight)
  cmicImgSave.Save("c:\k.bmp ")