Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Rotate Orientation

All examples are included with download of MBS FileMaker Plugin.

Rotate Orientation.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists1
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
test
4 fields defined, 1 record
test

Fields

Table Name: test - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Input ImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      Output ImageNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          textNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
                  OrientationNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German

                      Layout Objects: test

                      Regular Fields

                      Field Name: test::Input Image
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 117 pt
                      • Left: 8 pt
                      • Bottom: 592 pt
                      • Right: 433 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      • Optimized for interactive content
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      No

                      Field Name: test::Output Image
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 432 pt
                      • Left: 878 pt
                      • Bottom: 584 pt
                      • Right: 1011 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      • Optimized for interactive content
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      No

                      Field Name: test::Orientation
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 140 pt
                      • Left: 876 pt
                      • Bottom: 161 pt
                      • Right: 993 pt
                      • Anchoring: Left, Top
                      Field Format: Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      Yes

                      Buttons

                      Button PropertiesCoordinatesScript/Script Step
                        Type:
                      • Text: Change Orientation
                      • Top: 169 pt
                      • Left: 876 pt
                      • Bottom: 198 pt
                      • Right: 1009 pt
                      • Anchoring: Left, Top
                      Perform Script [ “Change Orientation” ]

                      Scripts:


                      Web Viewer Controls

                      Web Viewer Control PropertiesCoordinatesWeb Address
                        Additional Properties:
                      • Allow interaction with web viewer content
                      • Display status messages
                      • Automatically encode URL
                      • Top: 117 pt
                      • Left: 437 pt
                      • Bottom: 592 pt
                      • Right: 862 pt
                      • Anchoring: Left, Top
                      If ( IsEmpty ( test::Output Image ); "about:blank"; "data:image/jpeg;base64," & Base64Encode ( test::Output Image ) )

                      Value Lists

                      Value List NameSourceValuesOn Layouts
                      OrientationsCustom
                      • 1 Top Left, 2 Top Right, 3 Bottom Right, 4 Bottom Left, 5 Left Top, 6 Right Top, 7 Right Bottom, 8 Left Bottom

                      Script Hierarchy

                      Change Orientation
                      Clear

                      Next Script: [Clear]
                      Script NameChange Orientation
                      Run script with full access privilegesOff
                      Include In MenuYes
                      Layouts that use this script
                      Scripts that use this script
                        Script Definition
                        Script Steps
                        • #We set the orientation and write it to the metadata
                        • #Clear output image
                        • Set Field [ test::Output Image; "" ]
                        • #Load from container
                        • Set Variable [ $img; Value:MBS( "GMImage.NewFromContainer"; test::Input Image ) ]
                        • #Set the orientation and write it to metadata
                        • Set Variable [ $r; Value:MBS( "GMImage.SetOrientation"; $img; GetAsNumber ( test::Orientation ) ) ]
                        • Set Variable [ $r; Value:MBS( "GMImage.SetExifOrientation"; $img; GetAsNumber ( test::Orientation ) ) ]
                        • #You can control the orientation in the debugger
                        • Set Variable [ $r; Value:MBS( "GMImage.GetExifOrientation"; $img; GetAsNumber ( test::Orientation ) ) ]
                        • #Set output and release image
                        • Set Field [ test::Output Image; MBS( "GMImage.WriteToJPEGContainer"; $img; "test.jpg") ]
                        • Set Variable [ $r; Value:MBS( "GMImage.Free"; $img ) ]
                        Fields used in this script
                        Scripts used in this script
                          Layouts used in this script
                            Tables used in this script
                            Table occurrences used by this script
                            Custom Functions used by this script
                              Custom menu set used by this script

                                Previous Script: [Change Orientation]
                                Script NameClear
                                Run script with full access privilegesOff
                                Include In MenuYes
                                Layouts that use this script
                                  Scripts that use this script
                                    Script Definition
                                    Script Steps
                                    • #Clear the output image
                                    • Set Field [ test::Output Image; "" ]
                                    Fields used in this script
                                    Scripts used in this script
                                      Layouts used in this script
                                        Tables used in this script
                                        Table occurrences used by this script
                                        Custom Functions used by this script
                                          Custom menu set used by this script

                                            Download example: Rotate Orientation

                                            Used functions: