c#
[c#/wpf/winform] 화면캡쳐하기
개발자 고포고
2022. 12. 8. 21:27
반응형
[c#/wpf/winform] 화면캡쳐하기
#캡쳐화면
#코드
int width = 2160;
int height = 1440;
Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics gr = Graphics.FromImage(bmp);
gr.CopyFromScreen(0, 0, 0, 0, bmp.Size); //캡쳐
bmp.Save("test.png", ImageFormat.Png); // "test.png"로 파일 저장
#c# #wpf #winform #화면캡쳐 #capture #screen
반응형