Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
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