IronOCR OCR 프로그램에서 이미지 텍스트 변환을 위한 다양한 처리 후 이미지 저장
This article was translated from English: Does it need improvement?
Translated
View the article in English
다양한 이미지 처리/이미지 필터가 적용된 이미지를 저장하려면 어떻게 해야 하나요?
다음 간단한 코드 예제를 적용하세요:
// Create a new instance of OcrInput from a text box input for file path.
OcrInput input = new OcrInput(browsFile_txt.Text);
// Apply a grayscale filter to the image.
input.ToGrayScale();
// Iterate through each page in the OcrInput object.
foreach (var p in input.Pages)
{
// Save each processed page as an image with a unique timestamped filename.
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddHHmmss")}.png");
}
// Create a new instance of OcrInput from a text box input for file path.
OcrInput input = new OcrInput(browsFile_txt.Text);
// Apply a grayscale filter to the image.
input.ToGrayScale();
// Iterate through each page in the OcrInput object.
foreach (var p in input.Pages)
{
// Save each processed page as an image with a unique timestamped filename.
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddHHmmss")}.png");
}
' Create a new instance of OcrInput from a text box input for file path.
Dim input As New OcrInput(browsFile_txt.Text)
' Apply a grayscale filter to the image.
input.ToGrayScale()
' Iterate through each page in the OcrInput object.
For Each p In input.Pages
' Save each processed page as an image with a unique timestamped filename.
p.SaveAsImage($"{outputPath}\{DateTime.Now.ToString("yyyyMMddHHmmss")}.png")
Next p
$vbLabelText
$csharpLabel
IronOCR에서 사용 가능한 이미지 최적화 필터의 전체 목록은 IronOCR Image Filters를 참조하세요.
MSDN 스타일 클래스 문서 - OcrInput 메서드
시작할 준비 되셨나요?
Nuget 다운로드 5,585,834 | 버전: 2026.4 방금 출시되었습니다

