NSBitmapImageRep from tiff NSData bug?
NSBitmapImageRep from tiff NSData bug?
- Subject: NSBitmapImageRep from tiff NSData bug?
- From: Patrick Haruksteiner <email@hidden>
- Date: Mon, 5 Feb 2007 23:08:26 +0100
Hello Cocoa-dev members,
I ran into a problem when i tried to convert image data and export it
to a gif file.
Here is a little snippet:
image = [self createImageFromView:animationView forTimeStamp:t];
tiffData = [image TIFFRepresentation];
bmpRep = [NSBitmapImageRep imageRepWithData:tiffData];
imgData = [bmpRep representationUsingType:NSGIFFileType properties:nil];
[imgData writeToFile:tmpFileName atomically:NO];
Well it works most time, but if the image contains only one color it
fails with " CGImageDestinationFinalize failed for output type
'com.compuserve.gif' ". I narrowed it down that the tiffData is
correct, but something happens during creation of the
NSBitmapImageRep in [NSBitmapImageRep imageRepWithData:tiffData];
I saved the tiffData directly to a tif file and it was a valid
picture, so can exclude the image creation process as cause... - and
I need the file as gif, not as tiff or an other format...
does anyone know the cause of this, or a workaround?
kind regrads
/patrick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden