• 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: NSImageRGBColorTable crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageRGBColorTable crash


  • Subject: Re: NSImageRGBColorTable crash
  • From: Glenn Andreas <email@hidden>
  • Date: Mon, 19 Apr 2004 22:26:51 -0500

On 20 apr 2004, at 00.34, Glenn Andreas wrote:

At 11:22 PM +0200 4/19/04, David Remahl wrote:
[[Resend, because the message didn't appear on the list the first time...]]

Has anyone had any success with using NSImageRGBColorTable to generate GIFs?

If tmp is a 768 byte file, containing a color lookup table, the following will crash:

Have you tried a valid color lookup table?
Yes, I did start off with using a valid color table (the all-white one was just for demonstration)...It wasn't quite as regular as the ramp one, because it was generated by the neuquant algorithm, so I should have thought of using a more typical one. I also explicitly turned off dithering, and still got the crash.

I have now tried the grayscale one, and it still crashes in ComputeDither (even with dithering turned off...).

Hm, perhaps "packed RGB" doesn't mean what it sounds like it should mean.

I've tried increasing the size of the file (just in case it was 16 bit components instead of 8 bit components), and it crashes in InitColorTable, called from NSCompressGIFImage.

I'm not sure if that's an improvement or not.

So I tried changing it to skip the CLUT, and take the NSData it produces, and recreate the image and dump the clut from there. Turns out it appears that "packed RGB" is actually suppose to mean "packed ARGB" (or maybe RGBA), because if I do:

python -c 'f=open("/tmp/clut","w"); f.write("\xff\xff\xff\xff"*256); f.close()'

it seems to work.

--
Glenn Andreas email@hidden mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSImageRGBColorTable crash
      • From: David Remahl <email@hidden>
References: 
 >NSImageRGBColorTable crash (From: David Remahl <email@hidden>)
 >Re: NSImageRGBColorTable crash (From: Glenn Andreas <email@hidden>)
 >Re: NSImageRGBColorTable crash (From: David Remahl <email@hidden>)

  • Prev by Date: Re: internal frameworks in app bundle
  • Next by Date: Re: NSImageRGBColorTable crash
  • Previous by thread: Re: NSImageRGBColorTable crash
  • Next by thread: Re: NSImageRGBColorTable crash
  • Index(es):
    • Date
    • Thread