Save Images with Different Processing in IronOCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

如何儲存已套用不同影像處理/影像濾鏡的影像? 應用以下簡單的程式碼範例: ```csharp // 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"); } ``` 如需 IronOCR 中可用的圖像最佳化篩選器的完整清單,請參閱 [IronOCR Image Filters](https://ironsoftware.com/csharp/ocr/examples/ocr-image-filters-for-net-tesseract/)。 MSDN-Style 類別文件 - [IronOcrInput 方法](https://ironsoftware.com/csharp/ocr/object-reference/api/IronOcr.OcrInput.html#methods)。

Curtis Chau
技術作家

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。

準備好開始了嗎?
Nuget 下載 5,044,537 | 版本: 2025.11 剛剛發布