[MonoTouch] CGImageCreate?
Miguel de Icaza
miguel at novell.com
Sun Nov 29 19:55:57 EST 2009
Hello Ed,
Please download:
http://tirania.org/tmp/monotouch.dll
After backing up your /Developer/MonoTouch/usr/lib/mono/2.1/
monotouch.dll, override it with this file.
You can now use CGDataProvider like this:
using (var image = new CGDataProvider (your_memory_block,
size_of_block)){
var image = new CGImage (...., provider, ...);
}
Let me know if there are any problems with it.
On Nov 28, 2009, at 1:44 AM, Ed Anuff wrote:
> Hi Miguel, thanks for looking into this. I've got an image decoder
> for an image format that UIImage doesn't support. The image decoder
> returns a raw RGB byte array of the pixels. I had hoped to use
> CGImageCreate to convert these into a CGImage and then a UIImage
> since CGImageCreate is very flexible in terms of the source data it
> can process. The workaround I've implemented is to convert the
> image data into TIFF format since UIImages can be created from TIFF
> data and I found some fairly simple code for doing this (while TIFF
> is a complicated format because of all the options it supports, an
> uncompressed 24bit image can be stored by preprending a small header
> to the raw image data and then appending some minimal metadata at
> the end).
>
> On Fri, Nov 27, 2009 at 10:20 PM, Miguel de Icaza
> <miguel at novell.com> wrote:
> Hello Ed,
>
> Can you describe the scenario that requires these APIs?
>
> I am trying to determine how I should expose these functions.
>
>
> On Nov 27, 2009, at 5:16 PM, Ed Anuff wrote:
>
> I can't find a binding for CGImageCreate. Is there anyway to use
> this? I'm not realy sure how to bind Core Foundation functions. It
> looks like CGDataProvider isn't bound either, which CGImageCreate
> needs. :(
>
> Ed
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20091129/2306d3e4/attachment-0001.html
More information about the MonoTouch
mailing list