Image Text Finder for .NET

Introduction to Image Text Finder for .NET

The Image Text Finder for .NET is a plugin that allows developers to extract text from images in their .NET applications. This guide will walk you through the features of the plugin and provide code examples on how to use it.

Supported File Formats

The Image Text Finder for .NET supports the following image file formats:

  • BMP
  • JPEG
  • PNG
  • GIF
  • TIFF

You can search for text in these image files using the plugin’s API.

Find Text in Images

To extract text from an image, you need to create an instance of the AsposeOcr class and call the ImageHasText method. Here is an example:

using Aspose.OCR;

AsposeOcr recognitionEngine = new AsposeOcr();
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose");       

In this example, we open a file stream to the image file and pass it to the ImageHasText method. The method returns if the text was found or not.

Find non-English Text in Images

To extract non-English text from an image, you need to create an instance of the ImageTextFinder class and call the ExtractText method. Here is an example:

using Aspose.OCR;

AsposeOcr recognitionEngine = new AsposeOcr();
RecognitionSettings settings = new RecognitionSettings(Language.Ara);
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose", settings);       

In this example, we open a file stream to the image file and pass it to the ImageHasText method. The method returns if the text was found or not.

Best Practices

Here are some best practices for using the Image Text Finder for .NET:

  • Make sure the image file is in a supported format.
  • Use the correct language setting for the text in the image.
  • Experiment with different font sizes to improve extraction accuracy.
  • Handle errors and exceptions properly to ensure robust application behavior.
 English