본문 바로가기

[C#]이미지 그릴때 확대해서 그리기

이미지를 그릴 때 확대해서 그리자.

g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bilinear;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;
g.DrawImage(image,  new Rectangle(x, y, imageWidth*2, imageHeight*2));


image : Bitmap 객체나 Image 객체등.
x :  찍힐 좌표 x
y : 찍힐 좌표 y
imageWidth : 이미지 가로 크기
imageWidth : 이미지 세로 크기

imageWidth*2, imageHeight*2 : 이미지의 두배만큼 x,y에 찍어라.