Image 使用CF提高图像大小调整性能
我有一个调整位图大小的函数,称为图像的多次实时处理,下面的代码非常慢,所以我的应用程序性能很差。有人知道用CF调整图像大小的其他方法吗?哪种方法更快Image 使用CF提高图像大小调整性能,image,compact-framework,performance,Image,Compact Framework,Performance,我有一个调整位图大小的函数,称为图像的多次实时处理,下面的代码非常慢,所以我的应用程序性能很差。有人知道用CF调整图像大小的其他方法吗?哪种方法更快 Image bmp = new Bitmap(size.Width, size.Height); using (var g = Graphics.FromImage(bmp)) { g.DrawImage(image, new Rectangle(0,
Image bmp = new Bitmap(size.Width, size.Height);
using (var g = Graphics.FromImage(bmp))
{
g.DrawImage(image,
new Rectangle(0,
0,
size.Width,
size.Height),
new Rectangle(0,
0,
image.Width,
image.Height),
GraphicsUnit.Pixel);
}
return (Bitmap)bmp;
关于,您可以尝试使用图像API创建所需大小的缩略图。我昨天刚读了一篇关于缩略图和剪辑的文章