ImageEn, unit iexHelperFunctions |
|
IEReadCorrectOrientationOfImageFile
Declaration
function IEReadCorrectOrientationOfImageFile(const Filename : string; ConservativeCheck : Boolean = True) : Integer;
Description
Upmarket digital cameras will automatically store the correct orientation of an image when the camera is rotated to take a portrait photo. This function calls
EXIF_Orientation to retrieve the desired orientation for a JPEG camera image.
If ConservativeCheck is true it performs some further checking to ensure the returned value is accurate (e.g. to avoid problems where the photo has already been rotated in another program).
Note: You must add the iexHelperFunctions unit to your uses clause
iBestOrientation := IEReadCorrectOrientationOfImageFile('D:\MyImage.jpeg', True);