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.Property
Queries the value of a property.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| CGImageSource | 3.4 | Yes | No | No | Yes, macOS only | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| 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" |
Result
Returns the value or error message.
Description
Queries the value of a property.See CGImageSource.Keys for a list of available properties.
Keys include (list not complete):
FileSize, {Exif}.ExposureTime, {Exif}.SubjectDistRange, {Exif}.MaxApertureValue, {Exif}.Flash, {Exif}.ColorSpace, {Exif}.ExifVersion, {Exif}.FocalLenIn35mmFilm, {Exif}.SceneCaptureType, {Exif}.ShutterSpeedValue, {Exif}.FNumber, {Exif}.LightSource, {Exif}.FileSource, {Exif}.Saturation, {Exif}.PixelYDimension, {Exif}.Sharpness, {Exif}.ApertureValue, {Exif}.Contrast, {Exif}.PixelXDimension, {Exif}.CustomRendered, {Exif}.WhiteBalance, {Exif}.DateTimeDigitized, {Exif}.ExposureProgram, {Exif}.ISOSpeedRatings, {Exif}.DateTimeOriginal, {Exif}.MeteringMode, {Exif}.FlashPixVersion, {Exif}.ComponentsConfiguration, {Exif}.ExposureMode, {Exif}.DigitalZoomRatio, {Exif}.ExposureBiasValue, ColorModel, Orientation, DPIHeight, PixelWidth, {IPTC}.Caption/Abstract, {IPTC}.TimeCreated, {IPTC}.DateCreated, {IPTC}.DigitalCreationDate, {IPTC}.DigitalCreationTime, PixelHeight, ProfileName, Depth, {TIFF}.Model, {TIFF}.ResolutionUnit, {TIFF}.YResolution, {TIFF}.XResolution, {TIFF}.Orientation, {TIFF}.ImageDescription, {TIFF}.Software, {TIFF}.DateTime, {TIFF}.Make, {JFIF}.DensityUnit, {JFIF}.IsProgressive, {JFIF}.YDensity, {JFIF}.JFIFVersion, {JFIF}.XDensity, DPIWidth.
Version 10.0 and newer may return arrays and dictionaries as JSON.
Examples
Query Image dimensions in pixel :
MBS( "CGImageSource.Property"; $ref; 0; "PixelWidth") & " x " & MBS( "CGImageSource.Property"; $ref; 0; "PixelHeight")
Query Image resolution in dpi:
MBS( "CGImageSource.Property"; $ref; 0; "DPIWidth") & " x " & MBS( "CGImageSource.Property"; $ref; 0; "DPIHeight")
Query GPS of first image:
Set Variable [ $img ; Value: MBS("CGImageSource.CreateWithData"; CGImageSource::ImageFile) ]
Set Variable [ $lat ; Value: MBS("CGImageSource.Property"; $img; 0; "{GPS}.Latitude") ]
Set Variable [ $long ; Value: MBS("CGImageSource.Property"; $img; 0; "{GPS}.Longitude") ]
Show Custom Dialog [ "GPS" ; $lat & " / " & $long ]
Set Variable [ $r ; Value: MBS("CGImageSource.Release"; $img) ]
See also
- CGImageSource.Count
- CGImageSource.CreateWithData
- CGImageSource.CreateWithPath
- CGImageSource.CreateWithURL
- CGImageSource.Export
- CGImageSource.HasProperty
- CGImageSource.Keys
- CGImageSource.Properties
- CGImageSource.Release
- CGImageSource.SetProperty
Example Databases
Blog Entries
Release notes
- Version 10.0
- Changed CGImageSource.Property to return array or dictionary encoded as JSON.
Created 18th August 2014, last changed 10th January 2020
CGImageSource.Properties - CGImageSource.Release
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins