我怎样才能调整在C#中的形象呢?

我怎样才能调整在C#中的形象呢?

问题描述:

我有一个形象

image = Image.FromStream(file.InputStream);

我如何使用属性 System.Drawing.Size 的调整它们的大小或者用于此属性?

How I can use the property System.Drawing.Size for resize them or where this property used for?

我可以直接调整,而不将其更改为位图或没有损失任何品质的形象。我不想只是总公司调整它们。

Can I direct resize the image without change them to bitmap or without loss any quality. I not want corp just resize them.

我如何在C#这样做吗?

How I can do this in C#?

您可以使用位图类的构造函数来帮助,实际上是位图图像的子类。

You can use Bitmap class's constructor to help, and actually Bitmap is a subclass of Image.

var image_16 = new System.Drawing.Bitmap(image, new Size(16, 16));

在参考 - http://msdn.microsoft.com /en-us/library/system.drawing.size.aspx

更提前GDI +技术能够找到

more advance by GDI+ technique able to find at

HTTP://www.$c$cproject.com/ KB / GDI加/ imageresize.aspx