• 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 17:34:53 -0500

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?

% python -c 'f=open("/tmp/clut","w"); f.write("\xff"*768); f.close()' # create a 768 byte file filled with FF.


This would just be a single color (I forget if 0xffffff is white or black for GIF files), which would make it impossible to do any sort of dithering (which is where it is crashing).

I'd at least try something like:

python -c 'f = open("/tmp/clut","w"); for i in range(0,255): f.write("%c%c%c" % (i,i,i))'

which would produce a grayscale ramp to at least give it somethign useful to dither...

--
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>)

  • Prev by Date: Re: accessing newly-created files
  • Next by Date: Re: why is quartz still interpolating ??
  • Previous by thread: NSImageRGBColorTable crash
  • Next by thread: Re: NSImageRGBColorTable crash
  • Index(es):
    • Date
    • Thread