http://stackoverflow.com/questions/2666351/bitmap-interpolation-c-sharp
public Image EnlargeImage(Image original, int width, int height)
{
Bitmap newimg = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(newimg))
{
// Here you set your interpolation mode
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
// Scale the image, by drawing it on the larger bitmap
g.DrawImage(original, new Rectangle(Point.Empty, newimg.Size));
}
return newimg;
}
Bitmap img = (Bitmap)EnlargeImage(bt, pictureBox_ori.Width, pictureBox_ori.Height);
'컴퓨터 과학 & 영상처리 관련 > C# / .NET / JAVA' 카테고리의 다른 글
c# List<> foreach, compare (0) | 2014.03.22 |
---|---|
c# list를 이용한 listviewitem 삭제 (0) | 2014.03.21 |
로고창 같은거? splash screen (0) | 2014.03.16 |
c# form 사이즈 고정 (0) | 2014.03.05 |
c# string to string[] newline, string sort (0) | 2014.03.05 |