CGImageSource.Keys
------------------

Queries the list of keys for all the properties in the image source.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CGImageSource](component_CGImageSource.md) | [3.4](newinversion34.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "CGImageSource.Keys"; Ref; Index ) 

**MBS**( **"CGImageSource.Keys";** /\* Queries the list of keys for all the properties in the image source. \*/  
**$Ref**; /\* The image source reference number returned by [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md), [CGImageSource.CreateWithPath](CGImageSourceCreateWithPath.md) or [CGImageSource.CreateWithURL](CGImageSourceCreateWithURL.md) \*/   
**$Index**) /\* The index of the image to query. -1 for global properties. Else a number from 0 to [CGImageSource.Count](CGImageSourceCount.md)-1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Ref | The image source reference number returned by [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md), [CGImageSource.CreateWithPath](CGImageSourceCreateWithPath.md) or [CGImageSource.CreateWithURL](CGImageSourceCreateWithURL.md) | $ref |
| Index | The index of the image to query. -1 for global properties. Else a number from 0 to [CGImageSource.Count](CGImageSourceCount.md)-1. | 0 |

### Result

Returns the list of keys or error message.

### Description

Queries the list of keys for all the properties in the image source.  
The list of keys varies depending on which image format is used and whether EXIF, IPTC or XMP metadata is available.  
  
e.g. keys for a JPEG image:  
{TIFF}.Software, {TIFF}.Orientation, {TIFF}.DateTime, {TIFF}.Artist, {TIFF}.Make, {TIFF}.Model, Depth, {IPTC}.Byline, {IPTC}.SpecialInstructions, {IPTC}.DigitalCreationDate, {IPTC}.DigitalCreationTime, {IPTC}.DateCreated, {IPTC}.TimeCreated, {IPTC}.StarRating, PixelHeight, {Exif}.ExifVersion, {Exif}.Flash, {Exif}.CameraOwnerName, {Exif}.LensModel, {Exif}.RecommendedExposureIndex, {Exif}.SubsecTimeOriginal, {Exif}.ExposureMode, {Exif}.LensSpecification, {Exif}.LensSerialNumber, {Exif}.FNumber, {Exif}.PixelYDimension, {Exif}.ApertureValue, {Exif}.FocalPlaneXResolution, {Exif}.MeteringMode, {Exif}.FocalPlaneResolutionUnit, {Exif}.ISOSpeedRatings, {Exif}.ExposureBiasValue, {Exif}.ShutterSpeedValue, {Exif}.SceneCaptureType, {Exif}.MaxApertureValue, {Exif}.CustomRendered, {Exif}.FocalLength, {Exif}.FocalPlaneYResolution, {Exif}.DateTimeOriginal, {Exif}.FlashPixVersion, {Exif}.SubsecTime, {Exif}.ColorSpace, {Exif}.PixelXDimension, {Exif}.SubsecTimeDigitized, {Exif}.SensitivityType, {Exif}.DateTimeDigitized, {Exif}.BodySerialNumber, {Exif}.ComponentsConfiguration, {Exif}.WhiteBalance, {Exif}.ExposureTime, {Exif}.ExposureProgram, {JFIF}.DensityUnit, {JFIF}.YDensity, {JFIF}.JFIFVersion, {JFIF}.XDensity, ProfileName, DPIWidth, {ExifAux}.LensID, {ExifAux}.SerialNumber, {ExifAux}.FlashCompensation, {ExifAux}.LensInfo, {ExifAux}.LensSerialNumber, {ExifAux}.LensModel, {ExifAux}.Firmware, DPIHeight, ColorModel, Orientation and PixelWidth.  
### Examples

Queries keys for an image:

 Set Variable \[ $img ; Value: MBS ( "[CGImageSource.CreateWithData](CGImageSourceCreateWithData.md)"; test::input ) \]   
Show Custom Dialog \[ "Keys" ; MBS ( "CGImageSource.Keys"; $img ; 0) \]   
Set Variable \[ $r ; Value: MBS ( "[CGImageSource.Release](CGImageSourceRelease.md)"; $img ) \]  
### See also

- [CGImageSource.Count](CGImageSourceCount.md)
- [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md)
- [CGImageSource.CreateWithPath](CGImageSourceCreateWithPath.md)
- [CGImageSource.CreateWithURL](CGImageSourceCreateWithURL.md)
- [CGImageSource.List](CGImageSourceList.md)
- [CGImageSource.Property](CGImageSourceProperty.md)
- [CGImageSource.Release](CGImageSourceRelease.md)
- [CGImageSource.Status](CGImageSourceStatus.md)
- [CGImageSource.Type](CGImageSourceType.md)

### Example Databases

- [Mac and iOS/CGImageSource](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/CGImageSource.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 4.1pr4](https://www.mbsplugins.de/archive/2014-03-09/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 5th January 2018

  
[CGImageSource.ImageAtIndex](CGImageSourceImageAtIndex.md) - [CGImageSource.List](CGImageSourceList.md)

[HTML Version](CGImageSourceKeys.shtml)