Re: cocoa-dev digest, Vol 2 #4042 - 4 msgs
Re: cocoa-dev digest, Vol 2 #4042 - 4 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #4042 - 4 msgs
- From: "Mike Gillilan" <email@hidden>
- Date: Mon, 19 Apr 2004 23:11:50 -0600
This is an automated email---
I'm out of the office from April 17th until April 21st.
Thanks,
Mike
>
>> cocoa-dev 04/19/04 23:00 >>>
Send cocoa-dev mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of cocoa-dev digest..."
Today's Topics:
1. Re: internal frameworks in app bundle (Jonathan 'Wolf' Rentzsch)
2. Re: NSImageRGBColorTable crash (Glenn Andreas)
3. Re: NSImageRGBColorTable crash (David Remahl)
4. Can I call a C method from inside java code? (Adam)
--__--__--
Message: 1
Subject: Re: internal frameworks in app bundle
Date: Mon, 19 Apr 2004 21:42:03 -0500
From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
To: "Cocoa-Dev Dev" <email@hidden>
Jeffrey J Barbose, email@hidden, wrote:
>
I've followed some of the directions i've found online for including a
>
separate framework inside an app bundle.
Which docs? There's a lot of old stuff out there. Here's the official,
current docs:
<
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/>
| Jonathan 'Wolf' Rentzsch
http://rentzsch.com
| Red Shed Software
http://redshed.net
| "better" necessarily means "different"
--__--__--
Message: 2
Date: Mon, 19 Apr 2004 22:26:51 -0500
To: David Remahl <email@hidden>
From: Glenn Andreas <email@hidden>
Subject: Re: NSImageRGBColorTable crash
Cc: email@hidden
>
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
--__--__--
Message: 3
Cc: email@hidden
From: David Remahl <email@hidden>
Subject: Re: NSImageRGBColorTable crash
Date: Tue, 20 Apr 2004 05:50:43 +0200
To: Glenn Andreas <email@hidden>
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
--__--__--
Message: 4
To: Cocoa-Dev Apple <email@hidden>
From: Adam <email@hidden>
Subject: Can I call a C method from inside java code?
Date: Tue, 20 Apr 2004 00:18:46 -0400
Newbie:
I have a .c file and .h file written in the original c language. They
implement a very complex method I would not like to rewrite in Java.
Can I somehow pass a value into this custom c method from my java code
and get the result returned in my java code?
I have herd that you can mix Java and Obj-c code in the same projects.
Does this refer to the java versions of the obj-c objects or actually
mixing of code from the two languages in the same project? After
searching cocoa.mamasam.com and the web I found server discussions
about calling java methods/objects from inside obj-c code. I would like
to do the reverse, call an original and custom c method from my Cocoa
Java code.
Thanks,
Adam
--__--__--
_______________________________________________
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.
End of cocoa-dev Digest
_______________________________________________
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.