ImageEn, unit iexHelperFunctions

JPEGLosslessRotateFile

JPEGLosslessRotateFile


Declaration


function JPEGLosslessRotateFile(const sInFilename : WideString; const sOutFilename : WideString; iRotateAngle : integer) : Boolean; overload;
function JPEGLosslessRotateFile(const sFilename : WideString; iRotateAngle : integer) : Boolean; overload;


Description


Calls JpegLosslessTransform or JpegLosslessTransform2 to losslessly rotate a JPEG image, but allows you to specify a rotation angle that matches the Rotate Angle parameter.

Note: All comments and markers are copied and the EXIF orientation and thumbnail are updated. All values other than -90, 90, 180, -180, 270 and -270 are ignored


Example


// Rotate MyImage.jpeg 90 deg. counter-clockwise and save to MyImage_ROT.jpeg
JPEGLosslessRotateFile('D:\MyImage.jpeg', 'D:\MyImage_ROT.jpeg', 90);