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 14:17:03 +0000
- Thread-topic: Best way to composite/tile multiple CGImages to one image
> On 08 Mar 2014, at 04:38, Trygve Inda <email@hidden> wrote:
>> I need to composite/tile about 20 images in a 4x5 grid to one image.
>
> What for? Knowing that might help finding a way to speed it up. I.e. why are
> the images separate, where are they supposed to go in the end? Display on
> screen? Writing to a standard image file format? Something else?
The images are coming from a video file at periodic intervals and are
destined for a jpg file consisting of multiple thumbnails stitched together.
The CGImages come from an AVAssetImageGenerator.
Instruments says the time spent in
[imageGenerator copyCGImageAtTime:targetTime actualTime:&actualTime
error:&error];
Is small, but the time in CGContextDrawImage is quite large. However, if I
comment out the CGContextDrawImage line, then the time spent in
copyCGImageAtTime it rather more significant.
I imagine when I get the CGImageRef from copyCGImageAtTime, I am not
actually getting any pixel data until it tries to draw in
CGContextDrawImage.
T.
_______________________________________________
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