MBS FileMaker Plugin Example Databases

Image Scaling

All examples are included with download of MBS FileMaker Plugin.

Image Scaling.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus33
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
Image Scaling
5 fields defined, 7 records
Image Scaling

Fields

Table Name: Image Scaling - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
      SizeNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          ResultNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              CommentNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                    InfoNormal, TextAuto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: German

                        Layout Objects: Image Scaling

                        Regular Fields

                        Field Name: Image Scaling::InputImage
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 6 pt
                        • Left: 138 pt
                        • Bottom: 299 pt
                        • Right: 553 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        No

                        Field Name: Image Scaling::Size
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 312 pt
                        • Left: 138 pt
                        • Bottom: 326 pt
                        • Right: 391 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Field Name: Image Scaling::Result
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 348 pt
                        • Left: 138 pt
                        • Bottom: 653 pt
                        • Right: 553 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        No

                        Field Name: Image Scaling::Comment
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 330 pt
                        • Left: 138 pt
                        • Bottom: 344 pt
                        • Right: 391 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Field Name: Image Scaling::Info
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 654 pt
                        • Left: 138 pt
                        • Bottom: 668 pt
                        • Right: 391 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Group Buttons

                        Button PropertiesCoordinatesScript/Script Step
                          Type:
                        • Text: Scale Image
                          Additional Properties:
                        • Change to hand cursor over button
                        • Rectangular
                        • Top: 336 pt
                        • Left: 570 pt
                        • Bottom: 361 pt
                        • Right: 679 pt
                        • Anchoring: Left, Top
                        Perform Script [ “Scale” ]

                        Scripts:


                        Button PropertiesCoordinatesScript/Script Step
                          Type:
                        • Text: Export Image
                          Additional Properties:
                        • Change to hand cursor over button
                        • Rectangular
                        • Top: 372 pt
                        • Left: 570 pt
                        • Bottom: 397 pt
                        • Right: 679 pt
                        • Anchoring: Left, Top
                        Export Field Contents [ Image Scaling::Result ]

                        Fields:


                        Button PropertiesCoordinatesScript/Script Step
                          Type:
                        • Text: Clear Images
                          Additional Properties:
                        • Change to hand cursor over button
                        • Rectangular
                        • Top: 36 pt
                        • Left: 606 pt
                        • Bottom: 61 pt
                        • Right: 739 pt
                        • Anchoring: Left, Top
                        Perform Script [ “ClearImages” ]

                        Scripts:


                        Script Hierarchy

                        Scale
                        ClearImages

                        Next Script: [ClearImages]
                        Script NameScale
                        Run script with full access privilegesOff
                        Include In MenuYes
                        Layouts that use this script
                        Scripts that use this script
                          Script Definition
                          Script Steps
                          • Set Variable [ $Image; Value:MBS("GMImage.NewFromContainer"; Image Scaling::InputImage) ]
                          • Set Variable [ $r; Value:MBS("GMImage.Scale";$Image; Image Scaling::Size) ]
                          • If [ $r ≠ "OK" ]
                          • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                          • Set Field [ Image Scaling::Info; $r ]
                          • Exit Script [ ]
                          • Else
                          • Set Field [ Image Scaling::Result; MBS("GMImage.WriteToPNGContainer"; $Image) ]
                          • Set Field [ Image Scaling::Info; MBS("GMImage.GetWidth";$Image) & " x " & MBS("GMImage.GetHeight";$Image) ]
                          • End If
                          • Set Variable [ $r; Value: MBS("GMImage.Destroy";$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

                                  Previous Script: [Scale]
                                  Script NameClearImages
                                  Run script with full access privilegesOff
                                  Include In MenuYes
                                  Layouts that use this script
                                  Scripts that use this script
                                    Script Definition
                                    Script Steps
                                    • Go to Record/Request/Page [ First ]
                                    • Loop
                                    • Set Field [ Image Scaling::Result; "" ]
                                    • Commit Records/Requests
                                    • Go to Record/Request/Page [ Next; Exit after last ]
                                    • End Loop
                                    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: Image Scaling

                                            Used functions:




                                            Links
                                            MBS Xojo Plugins