Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  

GMImage.CompositeXY

Compose an image onto another at specified offset and using specified algorithm.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
GraphicsMagick 2.0 Yes Yes Yes Yes Yes
MBS( "GMImage.CompositeXY"; ImageRef; OtherImageRef; xOffset; yOffset { ; CompositeOperator } )   More

Parameters

Parameter Description Example Flags
ImageRef The image reference number. 1
OtherImageRef The second image reference (a number returned from the GMImage.New functions) 2
xOffset The x offset. 0
yOffset The y offset. 0
CompositeOperator Optional operator.
Can be one of the following numbers:
UndefinedCompositeOp = 0, OverCompositeOp = 1, InCompositeOp = 2, OutCompositeOp = 3, AtopCompositeOp = 4, XorCompositeOp = 5, PlusCompositeOp = 6, MinusCompositeOp = 7, AddCompositeOp = 8, SubtractCompositeOp = 9, DifferenceCompositeOp = 10, MultiplyCompositeOp = 11, BumpmapCompositeOp = 12, CopyCompositeOp = 13, CopyRedCompositeOp = 14, CopyGreenCompositeOp = 15, CopyBlueCompositeOp = 16, CopyOpacityCompositeOp = 17, ClearCompositeOp = 18, DissolveCompositeOp = 19, DisplaceCompositeOp = 20, ModulateCompositeOp = 21, ThresholdCompositeOp = 22, NoCompositeOp = 23, DarkenCompositeOp = 24, LightenCompositeOp = 25, HueCompositeOp = 26, SaturateCompositeOp = 27, ColorizeCompositeOp = 28, LuminizeCompositeOp = 29, CopyCyanCompositeOp = 32, CopyMagentaCompositeOp = 33, CopyYellowCompositeOp = 34, CopyBlackCompositeOp = 35, DivideCompositeOp = 36.
Default is 2.
2 Optional

Result

Returns "OK" on success.

Description

Compose an image onto another at specified offset and using specified algorithm.
You can use this function for example to add a watermark image.

Examples

Compose a picture on second:

# load images...
Set Variable [ $Image1 ; Value: MBS( "GMImage.NewFromFile"; "/Users/cs/Pictures/IMG_3625.jpg") ]
Set Variable [ $Image2 ; Value: MBS( "GMImage.NewFromFile"; "/Users/cs/Pictures/mond.jpg") ]
# put first on second
Set Variable [ $r ; Value: MBS( "GMImage.CompositeXY"; $Image2; $Image1; 500; 200) ]
# and save to file
Set Variable [ $r ; Value: MBS( "GMImage.WriteToFile"; $Image2; "/Users/cs/Pictures/output.jpg") ]
# free memory
Set Variable [ $r ; Value: MBS( "GMImage.Release"; $Image1) ]
Set Variable [ $r ; Value: MBS( "GMImage.Release"; $Image2) ]

See also

Example Databases

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 11st December 2019


GMImage.Composite   -   GMImage.Contrast

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins