MBS FileMaker Plugin Example Databases

Reduce Image

All examples are included with download of MBS FileMaker Plugin.

Reduce Image.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
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: 24 pt
                                                                                                  • Left: 138 pt
                                                                                                  • Bottom: 149 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: 192 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 317 pt
                                                                                                  • Right: 259 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: 372 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 497 pt
                                                                                                  • Right: 259 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: 324 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 338 pt
                                                                                                  • Right: 259 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: 504 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 518 pt
                                                                                                  • Right: 259 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: 156 pt
                                                                                                  • Left: 138 pt
                                                                                                  • Bottom: 170 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: 192 pt
                                                                                                  • Left: 282 pt
                                                                                                  • Bottom: 317 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
                                                                                                  No

                                                                                                  Field Name: Reduce::JPEG with high quality size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 324 pt
                                                                                                  • Left: 282 pt
                                                                                                  • Bottom: 338 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::JPEG with low quality
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 372 pt
                                                                                                  • Left: 282 pt
                                                                                                  • Bottom: 497 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
                                                                                                  No

                                                                                                  Field Name: Reduce::JPEG with low quality size
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 504 pt
                                                                                                  • Left: 282 pt
                                                                                                  • Bottom: 518 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::JPEG with high quality Gray
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 192 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 317 pt
                                                                                                  • Right: 811 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: 324 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 336 pt
                                                                                                  • Right: 811 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: 372 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 497 pt
                                                                                                  • Right: 811 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: 504 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 516 pt
                                                                                                  • Right: 811 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: 126 pt
                                                                                                  • Left: 636 pt
                                                                                                  • Bottom: 138 pt
                                                                                                  • Right: 749 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: 144 pt
                                                                                                  • Left: 636 pt
                                                                                                  • Bottom: 156 pt
                                                                                                  • Right: 749 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: 528 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 540 pt
                                                                                                  • Right: 811 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: 546 pt
                                                                                                  • Left: 558 pt
                                                                                                  • Bottom: 558 pt
                                                                                                  • Right: 811 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: 552 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 677 pt
                                                                                                  • Right: 259 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: 678 pt
                                                                                                  • Left: 6 pt
                                                                                                  • Bottom: 690 pt
                                                                                                  • Right: 259 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: Run
                                                                                                    Additional Properties:
                                                                                                  • Change to hand cursor over button
                                                                                                  • Rectangular
                                                                                                  • Top: 66 pt
                                                                                                  • Left: 408 pt
                                                                                                  • Bottom: 97 pt
                                                                                                  • Right: 511 pt
                                                                                                  • Anchoring: Left, Top
                                                                                                  Perform Script [ “Run” ]

                                                                                                  Scripts:


                                                                                                  Script Hierarchy

                                                                                                  Run

                                                                                                  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
                                                                                                    • Set Variable [ $r; Value:MBS("Trace") ]
                                                                                                    • #Load image
                                                                                                    • Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; Reduce::OriginalImage) ]
                                                                                                    • 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
                                                                                                    • #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" ) ]
                                                                                                    • #Cleanup
                                                                                                    • Set Variable [ $r; Value:MBS("GMImage.Destroy"; $img) ]
                                                                                                    • Set Variable [ $r; Value:MBS("GMImage.Destroy"; $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

                                                                                                            Download example: Reduce Image

                                                                                                            Used functions:




                                                                                                            Links
                                                                                                            MBS FileMaker blog