IronOCRで異なる処理を施した画像を保存する
Curtis Chau
更新日: 2026年7月6日
異なる画像処理/画像フィルターを適用した画像を保存するにはどうすればよいですか?
次の簡単なコード例を適用します。
// Create a new instance of OcrInput and load the image from a text box input for file path.
OcrInput input = new OcrInput();
input.LoadImage(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.GetPages())
{
// 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 and load the image from a text box input for file path.
Dim input As New OcrInput()
input.LoadImage(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.GetPages()
' Save each processed page as an image with a unique timestamped filename.
p.SaveAsImage($"{outputPath}\{DateTime.Now.ToString("yyyyMMddHHmmss")}.png")
Next' Create a new instance of OcrInput and load the image from a text box input for file path.
Dim input As New OcrInput()
input.LoadImage(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.GetPages()
' Save each processed page as an image with a unique timestamped filename.
p.SaveAsImage($"{outputPath}\{DateTime.Now.ToString("yyyyMMddHHmmss")}.png")
NextIronOCR で利用可能な画像最適化フィルターの完全なリストについては、IronOCR Image Filters を参照してください。
MSDNスタイルのクラスドキュメント - OcrInput メソッド
テクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。