Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class Deskew
public static void Run()
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
string fileName = "skewed.png";
string output = "skewed.out.png";
string inputFileName = Path.Combine(dataDir, fileName);
// Get rid of the skewed scan with default parameters
using (RasterImage image = (RasterImage)Image.Load(inputFileName))
image.NormalizeAngle(false /*do not resize*/, Color.LightGray /*background color*/);
image.Save(Path.Combine(dataDir, output));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.