89#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 20000
95#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1040
118 CFStringRef uti_hint = format_to_uti(hint_format_type);
121 (
const void **)&kCGImageSourceTypeIdentifierHint,
122 (
const void **)&uti_hint,
124 &kCFTypeDictionaryKeyCallBacks,
125 &kCFTypeDictionaryValueCallBacks);
128 CGImageSourceRef image_source = CGImageSourceCreateWithDataProvider(data_provider,
options);
129 us->
data = CGImageSourceCreateImageAtIndex(image_source, 0,
NULL);
131 CFRelease(image_source);
137 us->
data = CGImageCreateWithPNGDataProvider(data_provider,
NULL,
false, kCGRenderingIntentDefault);
140 us->
data = CGImageCreateWithJPEGDataProvider(data_provider,
NULL,
false, kCGRenderingIntentDefault);
151 CGDataProviderRelease(data_provider);