---
title: "CGImageSourceGetType(_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagesourcegettype(_:)"
---

# CGImageSourceGetType(_:)

Returns the uniform type identifier of the source container.

## Declaration

```swift
func CGImageSourceGetType(_ isrc: CGImageSource) -> CFString?
```

## Parameters

- `isrc`: The image source that contains the image data.

## Return Value

Return Value The uniform type identifier of the image source container.

## Discussion

Discussion The uniform type identifier of the source container can be different from the type of the images in the container. For example, the .icns format supports embedded JPEG2000. The type of the source container is "com.apple.icns", but type of the images is JPEG2000. For a list of system-declared and third-party identifiers, see Uniform Type Identifiers.

## See Also

### Getting Information From an Image Source

- [CGImageSourceGetTypeID()](imageio/cgimagesourcegettypeid().md)
- [CGImageSourceCopyTypeIdentifiers()](imageio/cgimagesourcecopytypeidentifiers().md)
- [CGImageSourceGetCount(_:)](imageio/cgimagesourcegetcount(_:).md)
- [CGImageSourceCopyProperties(_:_:)](imageio/cgimagesourcecopyproperties(_:_:).md)
- [CGImageSourceCopyPropertiesAtIndex(_:_:_:)](imageio/cgimagesourcecopypropertiesatindex(_:_:_:).md)
- [CGImageSourceCopyAuxiliaryDataInfoAtIndex(_:_:_:)](imageio/cgimagesourcecopyauxiliarydatainfoatindex(_:_:_:).md)
