MBS FileMaker Plugin Example Databases

Reduce Image

All examples are included with download of MBS FileMaker Plugin.

Reduce Image.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
Reduce
20 fields defined, 1 record
Reduce

Fields

Table Name: Reduce - 20 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
OriginalImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      OriginalImage sizeNormal, TextAuto-Enter: Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
            PNG with RGBNormal, BinaryAuto-Enter:
            • Allow editing
            Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
                PNG with RGB sizeNormal, TextAuto-Enter: Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                • Indexing: None
                • Automatically create indexes as needed
                • Index Language: German
                      PNG with GrayNormal, BinaryAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                          PNG with Gray SizeNormal, TextAuto-Enter: Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                                JPEG with high qualityNormal, BinaryAuto-Enter:
                                • Allow editing
                                Validation:
                                • Only during data entry
                                Storage:
                                • Repetitions: 1
                                    JPEG with high quality sizeNormal, TextAuto-Enter: Validation:
                                    • Only during data entry
                                    Storage:
                                    • Repetitions: 1
                                    • Indexing: None
                                    • Automatically create indexes as needed
                                    • Index Language: German
                                          JPEG with low qualityNormal, BinaryAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                              JPEG with low quality sizeNormal, TextAuto-Enter: Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                    JPEG with high quality GrayNormal, BinaryAuto-Enter:
                                                    • Allow editing
                                                    Validation:
                                                    • Only during data entry
                                                    Storage:
                                                    • Repetitions: 1
                                                        JPEG with high quality size GrayNormal, TextAuto-Enter: Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Repetitions: 1
                                                        • Indexing: None
                                                        • Automatically create indexes as needed
                                                        • Index Language: German
                                                              JPEG with low quality GrayNormal, BinaryAuto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                                  JPEG with low quality size GrayNormal, TextAuto-Enter: Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Repetitions: 1
                                                                  • Indexing: None
                                                                  • Automatically create indexes as needed
                                                                  • Index Language: German
                                                                        ScaleWidthNormal, TextAuto-Enter:
                                                                        • Allow editing
                                                                        Validation:
                                                                        • Only during data entry
                                                                        Storage:
                                                                        • Repetitions: 1
                                                                        • Indexing: None
                                                                        • Automatically create indexes as needed
                                                                        • Index Language: German
                                                                            ScaleHeightNormal, TextAuto-Enter:
                                                                            • Allow editing
                                                                            Validation:
                                                                            • Only during data entry
                                                                            Storage:
                                                                            • Repetitions: 1
                                                                            • Indexing: None
                                                                            • Automatically create indexes as needed
                                                                            • Index Language: German
                                                                                DestHeightNormal, TextAuto-Enter:
                                                                                • Allow editing
                                                                                Validation:
                                                                                • Only during data entry
                                                                                Storage:
                                                                                • Repetitions: 1
                                                                                • Indexing: None
                                                                                • Automatically create indexes as needed
                                                                                • Index Language: German
                                                                                    DestWidthNormal, TextAuto-Enter:
                                                                                    • Allow editing
                                                                                    Validation:
                                                                                    • Only during data entry
                                                                                    Storage:
                                                                                    • Repetitions: 1
                                                                                    • Indexing: None
                                                                                    • Automatically create indexes as needed
                                                                                    • Index Language: German
                                                                                        PNG with BWNormal, BinaryAuto-Enter:
                                                                                        • Allow editing
                                                                                        Validation:
                                                                                        • Only during data entry
                                                                                        Storage:
                                                                                        • Repetitions: 1
                                                                                            PNG with BW sizeNormal, TextAuto-Enter: Validation:
                                                                                            • Only during data entry
                                                                                            Storage:
                                                                                            • Repetitions: 1
                                                                                            • Indexing: None
                                                                                            • Automatically create indexes as needed
                                                                                            • Index Language: German

                                                                                                  Layout Objects: Reduce

                                                                                                  Regular Fields

                                                                                                  Field Name: Reduce::OriginalImage
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 121 pt
                                                                                                  • Left: 138 pt
                                                                                                  • Bottom: 246 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
                                                                                                  No

                                                                                                  Field Name: Reduce::PNG with RGB
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 327 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 452 pt
                                                                                                  • Right: 256 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: Reduce::PNG with Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 533 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 658 pt
                                                                                                  • Right: 256 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: Reduce::PNG with RGB size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 459 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 480 pt
                                                                                                  • Right: 256 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: Reduce::PNG with Gray Size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 667 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 688 pt
                                                                                                  • Right: 256 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: Reduce::OriginalImage size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 258 pt
                                                                                                  • Left: 138 pt
                                                                                                  • Bottom: 279 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: Reduce::JPEG with high quality
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 327 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 452 pt
                                                                                                  • Right: 532 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: Reduce::JPEG with high quality size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 459 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 480 pt
                                                                                                  • Right: 532 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: Reduce::JPEG with low quality
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 533 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 658 pt
                                                                                                  • Right: 532 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: Reduce::JPEG with low quality size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 667 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 688 pt
                                                                                                  • Right: 532 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: Reduce::JPEG with high quality Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 327 pt
                                                                                                  • Left: 555 pt
                                                                                                  • Bottom: 452 pt
                                                                                                  • Right: 808 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: Reduce::JPEG with high quality size Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 459 pt
                                                                                                  • Left: 555 pt
                                                                                                  • Bottom: 480 pt
                                                                                                  • Right: 808 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: Reduce::JPEG with low quality Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 533 pt
                                                                                                  • Left: 555 pt
                                                                                                  • Bottom: 658 pt
                                                                                                  • Right: 808 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: Reduce::JPEG with low quality size Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 667 pt
                                                                                                  • Left: 555 pt
                                                                                                  • Bottom: 688 pt
                                                                                                  • Right: 808 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: Reduce::ScaleWidth
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 137 pt
                                                                                                  • Left: 399 pt
                                                                                                  • Bottom: 158 pt
                                                                                                  • Right: 539 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: Reduce::ScaleHeight
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 180 pt
                                                                                                  • Left: 399 pt
                                                                                                  • Bottom: 201 pt
                                                                                                  • Right: 535 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: Reduce::DestHeight
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 756 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 777 pt
                                                                                                  • Right: 532 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: Reduce::DestWidth
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 815 pt
                                                                                                  • Left: 279 pt
                                                                                                  • Bottom: 836 pt
                                                                                                  • Right: 532 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: Reduce::PNG with BW
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 721 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 846 pt
                                                                                                  • Right: 256 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: Reduce::PNG with BW size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 856 pt
                                                                                                  • Left: 3 pt
                                                                                                  • Bottom: 877 pt
                                                                                                  • Right: 256 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

                                                                                                  Buttons

                                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                                    Type:
                                                                                                  • Text: Run
                                                                                                  • Top: 218 pt
                                                                                                  • Left: 399 pt
                                                                                                  • Bottom: 246 pt
                                                                                                  • Right: 539 pt
                                                                                                  • Anchoring: Left, Top
                                                                                                  Perform Script [ “Run” ]

                                                                                                  Scripts:


                                                                                                  Script Hierarchy

                                                                                                  Run
                                                                                                  Clear

                                                                                                  Next Script: [Clear]
                                                                                                  Script NameRun
                                                                                                  Run script with full access privilegesOff
                                                                                                  Include In MenuYes
                                                                                                  Layouts that use this script
                                                                                                  Scripts that use this script
                                                                                                    Script Definition
                                                                                                    Script Steps
                                                                                                    • #return the image in different formats, qualities and color spaces and set the file size
                                                                                                    • #Starts logging all plugin calls to a text file.
                                                                                                    • Set Variable [ $r; Value:MBS("Trace") ]
                                                                                                    • #Load image
                                                                                                    • Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; Reduce::OriginalImage) ]
                                                                                                    • #Error occurred while opening
                                                                                                    • If [ MBS("Iserror") ]
                                                                                                    • Show Custom Dialog [ Message: "Failed to open image!"& ¶ & $img; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                    • Exit Script [ ]
                                                                                                    • End If
                                                                                                    • #Have we given values to scale
                                                                                                    • Set Variable [ $ScaleWidth; Value:GetAsNumber(Reduce::ScaleWidth) ]
                                                                                                    • Set Variable [ $ScaleHeight; Value:GetAsNumber(Reduce::ScaleHeight) ]
                                                                                                    • Set Variable [ $DoScale; Value:0 ]
                                                                                                    • If [ $ScaleWidth > 0 ]
                                                                                                    • If [ $ScaleHeight > 0 ]
                                                                                                    • Set Variable [ $Scale; Value:GetAsText($ScaleWidth) & "x" & GetAsText($ScaleHeight) ]
                                                                                                    • Else
                                                                                                    • Set Variable [ $Scale; Value:GetAsText($ScaleWidth) ]
                                                                                                    • End If
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Scale"; $img; $Scale ) ]
                                                                                                    • End If
                                                                                                    • #Clear profiles
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetICCColorProfile"; $img; "" ) ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Setprofile"; $img; "IPTC"; "" ) ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Setprofile"; $img; "ICM"; "" ) ]
                                                                                                    • #query size
                                                                                                    • Set Field [ Reduce::DestHeight; MBS( "GMImage.GetHeight"; $img) ]
                                                                                                    • Set Field [ Reduce::DestWidth; MBS( "GMImage.GetWidth"; $img) ]
                                                                                                    • #For JPEG make a copy without alpha channel
                                                                                                    • Set Variable [ $secondImage; Value:MBS( "GMImage.New"; Reduce::DestWidth & "x" & Reduce::DestHeight; "white" ) ]
                                                                                                    • #6 = RGB without alpha
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $secondImage; 6 ) ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.CompositeXY"; $secondImage; $img; 0; 0; 1 ) ]
                                                                                                    • #PNG with RGB
                                                                                                    • Set Field [ Reduce::PNG with RGB; MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" ) ]
                                                                                                    • #JPEG with RGB
                                                                                                    • #80% quality
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetQuality"; $secondImage; 80 ) ]
                                                                                                    • Set Field [ Reduce::JPEG with high quality; MBS( "GMImage.WriteToJPEGContainer"; $secondImage; "test.png" ) ]
                                                                                                    • #reduce quality to 50%
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetQuality"; $secondImage; 50 ) ]
                                                                                                    • Set Field [ Reduce::JPEG with low quality; MBS( "GMImage.WriteToJPEGContainer"; $secondImage; "test.png" ) ]
                                                                                                    • #PNG with Gray
                                                                                                    • #Make Gray, with or without alpha (for PNG)
                                                                                                    • If [ MBS("GMImage.GetMatte"; $img) = 1 ]
                                                                                                    • #3 = Gray with alpha
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $img; 3 ) ]
                                                                                                    • Else
                                                                                                    • #2 = Gray without alpha
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $img; 2 ) ]
                                                                                                    • End If
                                                                                                    • Set Field [ Reduce::PNG with Gray; MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" ) ]
                                                                                                    • #JPEG with RGB Gray
                                                                                                    • #2 = Gray without alpha
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $secondImage; 2 ) ]
                                                                                                    • #80% quality
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetQuality"; $secondImage; 80 ) ]
                                                                                                    • Set Field [ Reduce::JPEG with high quality Gray; MBS( "GMImage.WriteToJPEGContainer"; $secondImage; "test.png" ) ]
                                                                                                    • #reduce quality to 50%
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetQuality"; $secondImage; 50 ) ]
                                                                                                    • Set Field [ Reduce::JPEG with low quality Gray; MBS( "GMImage.WriteToJPEGContainer"; $secondImage; "test.png" ) ]
                                                                                                    • #PNG with Black/White
                                                                                                    • #Make Gray, with or without alpha (for PNG)
                                                                                                    • #1 = Black & White
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $secondImage; 1 ) ]
                                                                                                    • Set Field [ Reduce::PNG with BW; MBS( "GMImage.WriteToPNGContainer"; $secondImage; "test.png" ) ]
                                                                                                    • #Release image
                                                                                                    • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                                                                                                    • Set Variable [ $r; Value:MBS("GMImage.Free"; $secondImage) ]
                                                                                                    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: [Run]
                                                                                                            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 [ Reduce::PNG with RGB; "" ]
                                                                                                                • Set Field [ Reduce::PNG with Gray; "" ]
                                                                                                                • Set Field [ Reduce::JPEG with high quality; "" ]
                                                                                                                • Set Field [ Reduce::JPEG with low quality; "" ]
                                                                                                                • Set Field [ Reduce::JPEG with high quality Gray; "" ]
                                                                                                                • Set Field [ Reduce::JPEG with low quality Gray; "" ]
                                                                                                                • Set Field [ Reduce::PNG with BW; "" ]
                                                                                                                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: Reduce Image

                                                                                                                        Used functions:




                                                                                                                        Links
                                                                                                                        MBS FileMaker tutorial videos