Re: NSBitmapImageRep from tiff NSData bug?
Re: NSBitmapImageRep from tiff NSData bug?
- Subject: Re: NSBitmapImageRep from tiff NSData bug?
- From: Patrick Haruksteiner <email@hidden>
- Date: Mon, 5 Feb 2007 23:38:10 +0100
to explain why I would need a one-color image:
my application generates animations and exports it to quicktime or
gif. so if there is a time in the animation where nothing is visible
except the background, then I have an image with only one color - and
this is where the trouble starts...
/patrick
On Feb 05, 2007, at 23:14, John Stiles wrote:
A one-color image is just a colored square, no? Why would you need
this? :)
On Feb 5, 2007, at 2:08 PM, Patrick Haruksteiner wrote:
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
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