Development/Visual C#
(C#) Image to Bitmap 변환, 해상도 변경 (SetResolution)
qWooWp
2021. 3. 22. 10:40
반응형
Bitmap 에 해상도 변경 함수인 SetResolution 이 있어서 Image 를 Bitmap 으로 변경 한후
해상도를 변경하고 다시 그려야 하는 케이스가 있어서 정리 함.
Image myimg;
Bitmap bitmap;
try
{
myimg = Image.FromFile(m_ImagePath);
bitmap = new Bitmap(myimg);
bitmap.SetResolution(300, 300);
}
catch (Exception ex)
{
MessageBox.Show(this, ex.Message, this.Text);
return;
}
반응형