OSDN Git Service
(root)
/
buragesnap
/
BurageSnap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbfd044
)
Output the image on failure to detect
author
Kazuhiro
<fujieda@users.osdn.me>
Thu, 26 Nov 2015 13:15:52 +0000
(22:15 +0900)
committer
Kazuhiro
<fujieda@users.osdn.me>
Thu, 26 Nov 2015 13:15:52 +0000
(22:15 +0900)
BurageSnap/Capture.cs
patch
|
blob
|
history
diff --git
a/BurageSnap/Capture.cs
b/BurageSnap/Capture.cs
index
dcf8252
..
1ee380e
100644
(file)
--- a/
BurageSnap/Capture.cs
+++ b/
BurageSnap/Capture.cs
@@
-18,6
+18,7
@@
using System;
using System.Drawing;
using System.Drawing.Imaging;
+using System.IO;
using System.Runtime.InteropServices;
using System.Text;
@@
-46,7
+47,11
@@
namespace BurageSnap
{
_rectangle = DetectGameScreen(bmp);
if (_rectangle.IsEmpty)
+ {
+ using (var file = File.Create("debug.png"))
+ bmp.Save(file, ImageFormat.Png);
return null;
+ }
return bmp.Clone(_rectangle, bmp.PixelFormat);
}
}