private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { _timer = new Timer(TimerCallback, null, TimeSpan.FromMilliseconds(400), TimeSpan.FromMilliseconds(400)); string windowName = "Path Of Exile"; _windowHandler = new WindowHandler(windowName); _gameWindowCapturer = new GameWindowCapturer(_windowHandler); }
static void Main(string[] args) { string windowName = "Path Of Exile"; var windowHandler = new WindowHandler(windowName); var imageCapture = new GameWindowCapturer(windowHandler); var image = imageCapture.GetBitmapFromGameWindow(); var bars = ReadImage(image); bars.Item1?.Save(@"D:\poe\bars\buff.bmp", ImageFormat.Bmp); bars.Item2?.Save(@"D:\poe\bars\debuff.bmp", ImageFormat.Bmp); bars.Item1?.Dispose(); bars.Item2?.Dispose(); }