• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBitmapImageRep from tiff NSData bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSBitmapImageRep from tiff NSData bug? (From: Patrick Haruksteiner <email@hidden>)

  • Prev by Date: Re: NSXMLDocument pretty printing
  • Next by Date: Re: NSXMLDocument pretty printing
  • Previous by thread: NSBitmapImageRep from tiff NSData bug?
  • Next by thread: Re: NSBitmapImageRep from tiff NSData bug?
  • Index(es):
    • Date
    • Thread