Setting the Resolution for OMR Image in PHP

Aspose.OCR - Setting the Resolution for OMR Image

To Set the Resolution for OMR Image using Aspose.OCR Java for PHP, simply invoke SetImageResolution module. Here you can see example code.

PHP Code

## Initialize a string with template file location

$image_file = $dataDir . "sample_omr.jpg";

\# Create an instance of OmrImage class and load the template using the factory method Load

$omrImage=new OmrImage();

$image = $omrImage->load($image_file);

\# Define new value of image resolution in double format

$image->setResolution(210.0); # overwrites the old DPI value

\# Do processing

print "Set image resolution.".PHP_EOL;

Download Running Code

Download Setting the Resolution for OMR Image (Aspose.OCR) from any of the below mentioned social coding sites: