CGImageSource.Count
-------------------

Queries number of images in this 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.Count"; Ref ) 

**MBS**( **"CGImageSource.Count";** /\* Queries number of images in this image source. \*/  
**$Ref**) /\* The image source reference number returned by [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md), [CGImageSource.CreateWithPath](CGImageSourceCreateWithPath.md) or [CGImageSource.CreateWithURL](CGImageSourceCreateWithURL.md) \*/ 

### 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 |

### Result

Returns number of images or error message.

### Description

Queries number of images in this image source.  
### Examples

Query count:

 MBS ( "CGImageSource.Count"; $ref )  
### See also

- [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md)
- [CGImageSource.CreateWithURL](CGImageSourceCreateWithURL.md)
- [CGImageSource.Export](CGImageSourceExport.md)
- [CGImageSource.ImageAtIndex](CGImageSourceImageAtIndex.md)
- [CGImageSource.Keys](CGImageSourceKeys.md)
- [CGImageSource.List](CGImageSourceList.md)
- [CGImageSource.Properties](CGImageSourceProperties.md)
- [CGImageSource.SetProperty](CGImageSourceSetProperty.md)
- [CGImageSource.Status](CGImageSourceStatus.md)
- [CGImageSource.Type](CGImageSourceType.md)

### Example Databases

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

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[CGImageSource.ClearProperties](CGImageSourceClearProperties.md) - [CGImageSource.CreateWithData](CGImageSourceCreateWithData.md)

[HTML Version](CGImageSourceCount.shtml)