Fix Image Orientation
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadImage("/path/file.png");

ocrInput.Rotate(90);
ocrInput.Deskew();
ocrInput.Scale(150);

var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
NuGet Download
PM > Install-Package IronOcr
Fix Image Orientation

Fix Image Orientation

IronOCR's OcrInput includes built-in methods to adjust image orientation for optimal OCR accuracy:

  • Rotate(double degrees): rotates the image clockwise by the given degrees; use negative values for counter-clockwise rotations
  • Deskew(int maxDeskewAngle = 45): corrects skew up to a maximum angle (default 45°); returns true if correction was applied
  • Scale(int percent, bool scaleCrop = true): resizes the image proportionally (e.g. 150 for 150%)
Explore Image Orientation Correction Techniques in C#
View on GitHub

Ready to Get Started?

Nuget Downloads 6,357,159Version:2026.11just released