Re: NSImageRGBColorTable crash
Re: NSImageRGBColorTable crash
- Subject: Re: NSImageRGBColorTable crash
- From: David Remahl <email@hidden>
- Date: Tue, 20 Apr 2004 05:50:43 +0200
On 20 apr 2004, at 05.26, Glenn Andreas wrote:
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.
Oh, interresting...
I was pretty certain the file should be RGB, 8 bit / component, because
I found an old release note with the following text:
http://www.geminisolutions.com/WebObjects_4.5/Documentation/Developer/
YellowBox/ReleaseNotes/AppKit.html
"NSImageRGBColorTable: -- For GIF input and output. It consists of a
768 byte NSData object that contains a packed RGB table with each
component being 8 bits."
Using a 1024 byte color table, I avoid the crash, but the image
creation failes and I get the following on the console:
2004-04-20 05:41:58.734 App[12837] Unknown GIF label (0x00)
2004-04-20 05:41:58.736 App[12837] Inconsistent set of values to create
NSBitmapImageRep
Sigh...
/ David Remahl
_______________________________________________
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.