Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Orient image to be right-side up based on its current orientation attribute.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
Returns OK or error.
Try it:
# load image
Set Variable [ $Image ; Value: MBS( "GMImage.NewFromContainer"; Correct Image Orientation::Input ) ]
If [ MBS("IsError") = 0 ]
#
Set Variable [ $r ; Value: MBS( "GMImage.AutoOrient"; $Image ) ]
#
# Write back to new field
Set Field [ Correct Image Orientation::Output ; MBS( "GMImage.WriteToJPEGContainer"; $Image; GetAsText(Correct Image Orientation::Input)) ]
#
# free memory
Set Variable [ $r ; Value: MBS( "GMImage.Free"; $Image) ]
End If
This function checks for a license.
Created 28th December 2018, last changed 21st February 2023