Save Images with Different Processing in IronOCR
How can I save an image with different image processing/image filters applied?
Apply the following simple code example:
OcrInput Input = new OcrInput(browsFile_txt.Text);
// Image filter being tested
Input.ToGrayScale();
foreach (var p in Input.Pages)
{
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png");
}
OcrInput Input = new OcrInput(browsFile_txt.Text);
// Image filter being tested
Input.ToGrayScale();
foreach (var p in Input.Pages)
{
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png");
}
Dim Input As New OcrInput(browsFile_txt.Text)
' Image filter being tested
Input.ToGrayScale()
For Each p In Input.Pages
p.SaveAsImage($"{outputPath}\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png")
Next p
For a full list of image optimization filters available in IronOCR, see https://ironsoftware.com/csharp/ocr/examples/ocr-image-filters-for-net-tesseract/
MSDN-Style Class Documentation - https://ironsoftware.com/csharp/ocr/object-reference/api/IronOcr.OcrInput.html#methods