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
Tables1
Relationships0
Layouts1
Scripts3
Value Lists1
Custom Functions0
Custom Menus32
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
Combine Pictures
4 fields defined, 1 record
Combine Pictures

Fields

Table Name: Combine Pictures - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
BigImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      SmallImageNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          ResultNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              CompositeOpNormal, TextAuto-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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesScript/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 NameSourceValuesOn Layouts
                  CompositeOpCustom
                  • 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 NameCombinePictures
                  Run script with full access privilegesOff
                  Include In MenuYes
                  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 NameDraw Rectangle with image as pattern
                            Run script with full access privilegesOff
                            Include In MenuYes
                            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 NameClear
                                        Run script with full access privilegesOff
                                        Include In MenuYes
                                        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: