【发布时间】:2018-09-09 00:08:14
【问题描述】:
我有一个 120x120 的 png 图像。我想取其中的一部分 (10x10) 并将其缩放 x32 倍并显示给 picturebox pixelated。
我做了什么:
bmp = New Bitmap(320, 320, PixelFormat.Format32bppArgb) 'create a bitmap x32
Dim g As Graphics = Graphics.FromImage(bmp)
'draw the part in that bitmap
g.DrawImage(My.Resources.MyImage, New Rectangle(0, 0, 320, 320), New Rectangle(50, 50, 10, 10), GraphicsUnit.Pixel)
PictureBox1.Image = bmp
g.Dispose()
图像未像素化。我能做些什么来解决它?
【问题讨论】:
标签: vb.net image winforms picturebox