【发布时间】:2010-03-31 02:56:58
【问题描述】:
我试图理解为什么在 .NET 中裁剪图像后,我最终得到的图像是原始图像大小的 3 倍。 下面列出的是我用来裁剪图像的代码
Private Shared Function CropImage(ByVal img As Image, ByVal cropArea As Rectangle) As Image
Dim bmpImage As Bitmap = New Bitmap(img)
Dim bmpCrop As Bitmap = bmpImage.Clone(cropArea, img.PixelFormat)
Return CType(bmpCrop, Image)
End Function
其中 img 是从文件加载到图像对象中的原始图像。
我怎样才能减少图像的损失?
【问题讨论】: