ImgAutoOrient

Top  Previous  Next

Prototype

 

intAngle:=ImgAutoOrient(intImageHandle)

 

Description

 

Orients the image correctly, rotating it by 90, 180 or 270° if required.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

Returned value

 

intAngle : orientation angle before correction.

 

Notes

 

The orientation is computed making a statistical analysis of dark elements on the white background so cannot be 100% accurate. If you need more accuracy you could use our add-on allowing to orient the image by OCR. With this add-on you can be sure that the image is correctly oriented for natural reading.

 

Example

 

// Image auto orientation

Angle:=ImgAutoOrient(_CurrentImage);

 

// Log a message 

ApplicationLog('Orientation corrected: '+ IntToStr(Angle) +'°.');