On Dec 20, 2010, at 8:00 PM, Joe Ranieri wrote:
> You might consider just using ImageIO to create the TIFF data, instead
> of going up in to AppKit. It might be faster, and I find it a lot
> cleaner. For example:
> CFDataRef CreateTIFF(REALpicture myPicture) {
> CGImageRef image = REALCopyPictureCGImage(myPicture);
>
> CFMutableDataRef data = CFDataCreateMutable( NULL, 0 );
> CGImageDestinationRef dest = CGImageDestinationCreateWithData( data,
> kUTTypeTIFF, 1, NULL );
> CGImageDestinationAddImage( dest, image, NULL );
> CGImageDestinationFinalize( dest );
> CFRelease( dest );
>
> CFRelease( image );
> return data;
> }
Oh, that's pretty cool, because it takes away the console error messages.
Alfred
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>