ImageEn, unit iexHelperFunctions |
|
IEAutomaticallyRotateImageFile
Declaration
function IEAutomaticallyRotateImageFile(const Filename : string) : 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 and then calls
JpegLosslessTransform2 to losslessly rotate it.
If ConservativeCheck is true it performs some further checking to ensure the orientation data 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
// Rotate MyImage.jpeg if it is not correctly oriented
IEAutomaticallyRotateImageFile('D:\MyImage.jpeg', True);