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: Trygve Inda <email@hidden>
- Date: Sat, 08 Mar 2014 06:55:40 +0000
- Thread-topic: Best way to composite/tile multiple CGImages to one image
>
> 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
>
>
>
Interestingly if I call:
CGContextSetInterpolationQuality ([context graphicsPort],
kCGInterpolationNone);
It results in 10% slower processing. The antialiasing setting does not
affect speed at all.
Doing multiple threads will require quite a bit of work - I may give that a
try too. The destination is both screen and a file so I don't think Core
Animation will work.
I might be near the limits of what I can do speed-wise here. :(
_______________________________________________
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