<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/kCGImageSourcePrioritizeQuality",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@kCGImageSourcePrioritizeQuality"
  },
  "title" : "kCGImageSourcePrioritizeQuality"
}
-->

# kCGImageSourcePrioritizeQuality

A Boolean value that indicates whether to prioritize image quality over decode speed.

```
let kCGImageSourcePrioritizeQuality: CFString
```

## Discussion

When you set this key to <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanTrue>, the image source decodes the full-size image using the highest-quality decode method available for the file. The value of this key is a <doc://com.apple.documentation/documentation/CoreFoundation/CFBoolean>. The default value is <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanFalse>.

Currently, image sources support this option only for camera RAW images. This key is a no-op when it is absent or <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanFalse>, when the image isn’t a camera RAW format, or when no higher-quality decode method is available, so it is always safe to set.

Include this key in the options dictionary you pass to the functions [`CGImageSourceCopyPropertiesAtIndex(_:_:_:)`](/documentation/ImageIO/CGImageSourceCopyPropertiesAtIndex(_:_:_:)) and [`CGImageSourceCreateImageAtIndex(_:_:_:)`](/documentation/ImageIO/CGImageSourceCreateImageAtIndex(_:_:_:)).

## Example

```swift
let options = [
    kCGImageSourcePrioritizeQuality: true
] as CFDictionary
let image = CGImageSourceCreateImageAtIndex(source, 0, options)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)