Re: Best way to composite/tile multiple CGImages to one image
Re: Best way to composite/tile multiple CGImages to one image
- Subject: Re: Best way to composite/tile multiple CGImages to one image
- From: Graham Cox <email@hidden>
- Date: Sat, 08 Mar 2014 17:38:45 +1100
On 8 Mar 2014, at 5:02 pm, Trygve Inda <email@hidden> wrote:
> This is slower by about 15%. :(
Bummer.
I'm thinking that two seconds to composite 20 x 1920 x 1080 X 32 bits isn't too bad actually. That's 165 MB of actual pixel data to iterate over, and at each pixel it's going to have to perform considerable cubic downsampling and antialiasing operations for the 10x size reduction (have you tried adjusting options for image interpolation quality and antialiasing?).
Is there a way to composite this big image on a background thread or perhaps composite each contributing image using a different thread so it can at least spread the load across the available cores? I must admit that can be tricky because each thread will need its own context, but all sharing the same underlying destination bitmap buffer (but drawing into a different portion of it). Or, if the final image is just destined only for the screen, you could make each source image the content of a CALayer and composite it using Core Animation, which is then all done in hardware.
--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