Re: Concurrent loading of images ?
Re: Concurrent loading of images ?
- Subject: Re: Concurrent loading of images ?
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Sat, 9 May 2020 13:41:14 +0200
> Also, if you’re already getting a CGImageRef using
> CGImageSourceCreateImageAtIndex, why not just set imgLayer.contents to the
> CGImageRef?
sorry, my previous response regarding this was incomplete. What I am doing is
this, in order to get the EXIF orientation right:
CIImage * image = [CIImage imageWithCGImage: imageRef];
CIImage * orientedimage = [image imageByApplyingOrientation:
(CGImagePropertyOrientation) img_orientation];
NSCIImageRep * nsimgrep = [NSCIImageRep imageRepWithCIImage: orientedimage];
NSImage * nsImage = [[NSImage alloc] initWithSize: nsimgrep.size];
[nsImage addRepresentation: nsimgrep];
CALayer * imgLayer = [CALayer layer];
imgLayer.contents = nsImage;
Still, is there a better way?
Best regards, Gabriel
_______________________________________________
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