Re: Images with direct memory access
Re: Images with direct memory access
- Subject: Re: Images with direct memory access
- From: Graham Cox <email@hidden>
- Date: Fri, 27 Jul 2012 22:45:18 +1000
On 27/07/2012, at 10:36 PM, Vojtěch Meluzín wrote:
> I need to create and manipulate an image, which I could access directly
> from memory and at the same time be able to use system drawing functions
> for optimization. On Windows I can create a memory bitmap, but it seems it
> is on possible on Mac, or is it? Note that I don't want to do any
> conversions from handles to memory etc., the whole point is optimization.
What have you tried?
There are all sorts of ways you can manipulate images, here's one:
[NSBitmapImageRep initWithBitMapDataPlanes:.....];
by passing existing pointer to memory in bitPlanes, it will wrap that memory in the necessary bitmap structure rather than create a new one.
there are also some similar functions in CGImage (though it's more work to wrap an existing block of memory), and the vImage framework for image processing.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden