IRONSOFTWAREHOME
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);
Imports IronOcr
Imports System

Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
    ocrInput.LoadImage("/path/file.png")

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

    Dim ocrResult = ocrTesseract.Read(ocrInput)
    Console.WriteLine(ocrResult.Text)
End Using
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,236,385Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required