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

MBS FileMaker Plugin Example Databases

Combine Pictures

All examples are included with download of MBS FileMaker Plugin.

Combine Pictures.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 3
Value Lists 1
Custom Functions 0
Custom Menus 32
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Enlightened
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Combine Pictures
4 fields defined, 1 record
Combine Pictures

Fields

Table Name: Combine Pictures - 4 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
BigImage Normal, Binary Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      SmallImage Normal, Binary Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          Result Normal, Binary Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              CompositeOp Normal, Text Auto-Enter:
              • Constant data: 1
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Layout Objects: Combine Pictures

                  Regular Fields

                  Field Name: Combine Pictures::BigImage
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 83 pt
                  • Left: 32 pt
                  • Bottom: 568 pt
                  • Right: 393 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: Combine Pictures::SmallImage
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 83 pt
                  • Left: 830 pt
                  • Bottom: 316 pt
                  • Right: 1083 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: Combine Pictures::Result
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 83 pt
                  • Left: 431 pt
                  • Bottom: 568 pt
                  • Right: 792 pt
                  • Anchoring: Left and Right, Top and Bottom
                  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: Combine Pictures::CompositeOp
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 348 pt
                  • Left: 830 pt
                  • Bottom: 369 pt
                  • Right: 1083 pt
                  • Anchoring: Left, Top
                  Field Format: 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

                  Buttons

                  Button Properties Coordinates Script/Script Step
                    Type:
                  • Text: Combine
                  • Top: 379 pt
                  • Left: 830 pt
                  • Bottom: 412 pt
                  • Right: 1083 pt
                  • Anchoring: Left, Top
                  Perform Script [ “CombinePictures” ]

                  Scripts:


                  Value Lists

                  Value List Name Source Values On Layouts
                  CompositeOp Custom
                  • 0 = UndefinedCompositeOp, 1 = OverCompositeOp, 2 = InCompositeOp, 3 = OutCompositeOp, 4 = AtopCompositeOp, 5 = XorCompositeOp, 6 = PlusCompositeOp, 7 = MinusCompositeOp, 8 = AddCompositeOp, 9 = SubtractCompositeOp, 10 = DifferenceCompositeOp, 11 = MultiplyCompositeOp, 12 = BumpmapCompositeOp, 13 = CopyCompositeOp, 14 = CopyRedCompositeOp, 15 = CopyGreenCompositeOp, 16 = CopyBlueCompositeOp, 17 = CopyOpacityCompositeOp, 18 = ClearCompositeOp, 19 = DissolveCompositeOp, 20 = DisplaceCompositeOp, 21 = ModulateCompositeOp, 22 = ThresholdCompositeOp, 23 = NoCompositeOp, 24 = DarkenCompositeOp, 25 = LightenCompositeOp, 26 = HueCompositeOp, 27 = SaturateCompositeOp, 28 = ColorizeCompositeOp, 29 = LuminizeCompositeOp, 32 = CopyCyanCompositeOp, 33 = CopyMagentaCompositeOp, 34 = CopyYellowCompositeOp, 35 = CopyBlackCompositeOp, 36 = DivideCompositeOp

                  Script Hierarchy

                  CombinePictures
                  Draw Rectangle with image as pattern
                  Clear

                  Next Script: [Draw Rectangle with image as pattern]
                  Script Name CombinePictures
                  Run script with full access privileges Off
                  Siri Shortcut Visible Off
                  Include In Menu Yes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • #Position the small picture in the middel of the big image, overlay it with the graphic options
                    • #Load both pictures as reference
                    • Set Variable [ $BigImageRef; Value:MBS("GMImage.NewFromContainer"; Combine Pictures::BigImage) ]
                    • Set Variable [ $SmallImageRef; Value:MBS("GMImage.NewFromContainer"; Combine Pictures::SmallImage) ]
                    • #determine the size of both images
                    • Set Variable [ $SmallImageWidth; Value:MBS("GMImage.GetWidth";$SmallImageRef) ]
                    • Set Variable [ $SmallImageHeight; Value:MBS("GMImage.GetHeight";$SmallImageRef) ]
                    • Set Variable [ $BigImageWidth; Value:MBS("GMImage.GetWidth";$BigImageRef) ]
                    • Set Variable [ $BigImageHeight; Value:MBS("GMImage.GetHeight";$BigImageRef) ]
                    • #And calculate the distance from the edge. For the positioning of the smaller image on the larger one.
                    • Set Variable [ $X; Value:($BigImageWidth-$SmallImageWidth)/2 ]
                    • Set Variable [ $Y; Value:($BigImageHeight-$SmallImageHeight)/2 ]
                    • #Overlay both pictures with the option we have choose
                    • Set Variable [ $Error; Value:MBS( "GMImage.CompositeXY"; $BigImageRef; $SmallImageRef; $X; $Y; Combine Pictures::CompositeOp ) ]
                    • Set Variable [ $Error; Value:MBS( "GMImage.SetQuality"; $BigImageRef; 90 ) ]
                    • #Write to container and free references
                    • Set Field [ Combine Pictures::Result; MBS( "GMImage.WriteToPNGContainer"; $BigImageRef ) ]
                    • Set Variable [ $Error; Value:MBS("GMImage.Free";$BigImageRef) ]
                    • Set Variable [ $Error; Value:MBS("GMImage.Free";$SmallImageRef) ]
                    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: [CombinePictures] Next Script: [Clear]
                            Script Name Draw Rectangle with image as pattern
                            Run script with full access privileges Off
                            Siri Shortcut Visible Off
                            Include In Menu Yes
                            Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • #Load big picture
                                • Set Variable [ $BigImageRef; Value:MBS("GMImage.NewFromContainer"; Combine Pictures::BigImage) ]
                                • #load pattern picture
                                • Set Variable [ $SmallImageRef; Value:MBS("GMImage.NewFromContainer"; Combine Pictures::SmallImage) ]
                                • #Draw a rectangle using small image as pattern
                                • Set Variable [ $Error; Value:MBS( "GMImage.FillPattern"; $BigImageRef; $SmallImageRef) ]
                                • Set Variable [ $Error; Value:MBS( "GMImage.DrawRoundRectangle"; $BigImageRef; 100; 100; 300; 300; 20; 20) ]
                                • #Write to container and free references
                                • Set Field [ Combine Pictures::Result; MBS( "GMImage.WriteToPNGContainer"; $BigImageRef ) ]
                                • Set Variable [ $Error; Value:MBS("GMImage.Free";$BigImageRef) ]
                                • Set Variable [ $Error; Value:MBS("GMImage.Free";$SmallImageRef) ]
                                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: [Draw Rectangle with image as pattern]
                                        Script Name Clear
                                        Run script with full access privileges Off
                                        Siri Shortcut Visible Off
                                        Include In Menu Yes
                                        Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • Set Field [ Combine Pictures::Result; "" ]
                                            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: Combine Pictures

                                                    Used functions: