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
CGImageSource.SetProperty
Sets the value for a property.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| CGImageSource | 9.4 | Yes | No | No | Yes, macOS only | Yes |
MBS( "CGImageSource.SetProperty"; Ref; Index; Key; Value { ; Type } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Ref | The image source reference number returned by CGImageSource.CreateWithData, CGImageSource.CreateWithPath or CGImageSource.CreateWithURL | $ref | |
| Index | The index of the image to query. -1 for global properties. Else a number from 0 to CGImageSource.Count-1. | 0 | |
| Key | The property name to query. | "PixelWidth" | |
| Value | The value to use. Can be text, timestamp, boolean or number. |
"Hello" | |
| Type | Available in MBS FileMaker Plugin 10.3 or newer. Which data type to use. Default is to auto to pick data type based on FileMaker data type. Can be "auto", "text", "number" or "array". For keywords, pass a list of values, which we pass as array. |
"text" | Optional |
Result
Returns OK or error.
Description
Sets the value for a property.You may need to use CGImageSource.Export to actually write an image with new metadata.
The creation of new property dictionary is implemented for version 10.2, so you can create new sections like GPS.
Examples
Set keywords:
MBS("CGImageSource.SetProperty"; $ref; 0; "{IPTC}.Keywords"; "First¶Second¶Third"; "Array")
See also
- CGImageSource.ClearProperties
- CGImageSource.Count
- CGImageSource.CreateWithData
- CGImageSource.CreateWithPath
- CGImageSource.CreateWithURL
- CGImageSource.Export
- CGImageSource.HasProperty
- CGImageSource.Properties
- CGImageSource.Property
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 10.3pr5
- MBS FileMaker Plugin, version 10.2pr1
- Neue Funktionen des MBS FileMaker Plugin 9.4
- MBS FileMaker Plugin, version 9.4pr5
Release notes
- Version 10.3
- Added type parameter for CGImageSource.SetProperty function.
- Version 10.2
- Changed CGImageSource.SetProperty to write new metadata dictionaries.
- Version 9.4
- Added CGImageSource.HasProperty and CGImageSource.SetProperty to set metadata (IPTC/EXIF) and write file back.
Created 30th August 2019, last changed 19th June 2020
CGImageSource.ReleaseAll - CGImageSource.Status
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins