IronOCR'da Farklı İşleme ile Görselleri Kaydetme
Farklı görüntü işleme/görüntü filtreleri uygulayarak bir görüntüyü nasıl kaydedebilirim?
Aşağıdaki basit kod örneğini uygulayın:
// 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'de bulunan tam resim iyileştirme filtreleri listesi için, IronOCR Görüntü Filtreleri'ne bakın.
MSDN Tarzı Sınıf Dokümantasyonu - OcrInput Metotları
Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.