IMG_ImageIO.m
changeset 283 ec183abd5996
parent 279 e2fa9ff13b5d
child 292 5953114c0d27
equal deleted inserted replaced
282:e0527402f476 283:ec183abd5996
   107     CGDataProviderRef data_provider = CGDataProviderCreate(rw_ops, &provider_callbacks);
   107     CGDataProviderRef data_provider = CGDataProviderCreate(rw_ops, &provider_callbacks);
   108 #endif
   108 #endif
   109     // Get the CGImageSourceRef.
   109     // Get the CGImageSourceRef.
   110     // The dictionary can be NULL or contain hints to help ImageIO figure out the image type.
   110     // The dictionary can be NULL or contain hints to help ImageIO figure out the image type.
   111     source_ref = CGImageSourceCreateWithDataProvider(data_provider, hints_and_options);
   111     source_ref = CGImageSourceCreateWithDataProvider(data_provider, hints_and_options);
       
   112     CGDataProviderRelease(data_provider);
   112     return source_ref;
   113     return source_ref;
   113 }
   114 }
   114 
   115 
   115 /* Create a CGImageSourceRef from a file. */
   116 /* Create a CGImageSourceRef from a file. */
   116 /* Remember to CFRelease the created source when done. */
   117 /* Remember to CFRelease the created source when done. */