Good news I could make your plugin work with a very easy fix :
I think there is a bug in one of the overloaded DrawImage(...) in System.Drawing.Graphics.
You are using this one :
graphics.DrawImage(image.Bitmap, image.X, image.Y);
which gave me a distorted image when saving the final buffer to the hdd (the same I could see on my LCD)
using this one fixes the problem :
graphics.DrawImage(image.Bitmap, image.X, image.Y, widthInPixels, heightInPixels);
Perhaps it's a problem of DPI between the graphics and the bitmap we want to draw but I hadn't time to check. (should not be a problem since you're creating the graphics from the bitmap anyway)
So just change this line (bonus : it fixes all the cases where the bitmap the user created doesn't fit the monitor size)
Enjoy and thanks JoeDalton !
I think there is a bug in one of the overloaded DrawImage(...) in System.Drawing.Graphics.
You are using this one :
graphics.DrawImage(image.Bitmap, image.X, image.Y);
which gave me a distorted image when saving the final buffer to the hdd (the same I could see on my LCD)
using this one fixes the problem :
graphics.DrawImage(image.Bitmap, image.X, image.Y, widthInPixels, heightInPixels);
Perhaps it's a problem of DPI between the graphics and the bitmap we want to draw but I hadn't time to check. (should not be a problem since you're creating the graphics from the bitmap anyway)
So just change this line (bonus : it fixes all the cases where the bitmap the user created doesn't fit the monitor size)
Enjoy and thanks JoeDalton !