Re: Questions regarding release
Re: Questions regarding release
- Subject: Re: Questions regarding release
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Thu, 26 Sep 2019 11:16:20 +0200
Thanks a lot for your response.
>> Is it safe to do it after assigning the nsimage to the layer, but before
>> deleting the layer?
> I would think so, but it is hard to say without knowing what
> convertToNSImage:withOrientation actually does under the hood. It likely
> either retains or copies it.
Very sorry for that - this is what it does:
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];
return NSImage;
Best regards, Gabriel
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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