kCGImageSourceAllowableTypes
Option key for restricting which image formats can be decoded.
Declaration
let kCGImageSourceAllowableTypes: CFStringDiscussion
The value is a CFArray containing CFString Uniform Type Identifiers (UTIs) of allowed image formats. When specified, ImageIO will only decode images whose format matches one of the entries in the allow list. If no matching reader is found, decoding fails.
Unknown format identifiers are ignored. If not specified, all supported ImageIO formats are allowed (default behavior). If process-wide format restrictions were set via CGImageSourceSetAllowableTypes(_:), only formats allowed by both mechanisms are permitted.
See also System-declared uniform type identifiers.