Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5    Statistic  

GMImage.Read

Read single image frame into current object.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
GraphicsMagick 8.3 Yes Yes Yes Yes Yes
MBS( "GMImage.Read"; ImageRef; Spec { ; Geometry } )   More

Parameters

Parameter Description Example value
ImageRef The image reference number. 1
Spec The image specification.
e.g. native file path
Geometry Optional
The image size.
Geometry is specified as a width and height "100x200". With an optional offset "100x200+10+20". For percent values, add a percent on the end, for % values add a %: "100x200%!"
"100x200"

Result

Returns OK or error.

Description

Read single image frame into current object.
This allows you to directly specify the coders to use and include options.

e.g. gradient coder takes a range of two colors to create gradient.

Examples

Reads in a gradient image:

Set Variable [ $image ; Value: MBS( "GMImage.New"; "200x200"; "white" ) ]
Set Variable [ $r ; Value: MBS( "GMImage.Read"; $image; "gradient:#20a0ff-#ffff00;" ) ]
// Set Variable [ $r ; Value: MBS( "GMImage.Read"; $image; "gradient:white-black" ) ]
Set Field [ Contacts::Photo Container ; MBS( "GMImage.WriteToPNGContainer"; $image; "gradient.png") ]
Set Variable [ $r ; Value: MBS( "GMImage.Destroy"; $image) ]

See also

Created 25th May 2018, last changed 27th May 2018


GMImage.RandomThresholdChannel   -   GMImage.ReduceNoise

Feedback: Report problem or ask question.




Links
MBS Xojo blog