I'm trying to create a plugin that lets you grab images from the ALAssetLibrary in the photo album. I have the bytes for a jpeg, and I just need to return them back to my C# script.
The Objective C code seems to run ok. But the length of the bytes I get back in C# is 16777217. No idea what it is, but its not the 12k I saw in the XCode debugger.
Well, it's a problem to get unmanaged memory into managed code. I don't know ObjC (only C++) so the i'm not familiar with the syntax of ObjC. It's easier to do it the other way round. Pass a managed array to ObjC and fill the array. You need to set the array size either big enough, or you have to implement a query function to get the required size.
hope that helps a bit ;) Maybe there's a ObjC expert around
answered Jun 20 '11 at 05:08 AM