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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
GMImage.Read
Read single image frame into current object.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| GraphicsMagick | 8.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 | |
| Spec | The image specification. e.g. native file path |
||
| Geometry | 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" | Optional |
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.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
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.Release"; $image) ]
See also
- GMImage.New
- GMImage.ReadContainer
- GMImage.Release
- GMImage.Repage
- GMImage.Roll
- GMImage.Rows
- GMImage.SetBackgroundColor
- GMImage.Spread
- GMImage.WriteToPNGContainer
- Path.FileMakerPathToNativePath
Blog Entries
Release notes
- Version 10.2
- Added GMImage.ReadFromContainer function.
- Version 8.3
- Added GMImage.Read function, useful to create gradient images.
Created 25th May 2018, last changed 15th July 2020
GMImage.RandomThresholdChannel - GMImage.ReadContainer
Feedback: Report problem or ask question.
Links
MBS FileMaker blog