> 
> Also, if you’re already getting a CGImageRef using 
> CGImageSourceCreateImageAtIndex, why not just set imgLayer.contents to the 
> CGImageRef? 

Good point .  What I am doing right now is:

    NSImage * nsimage = [self convertToNSImage: img withOrientation: 
img_orientation];
    CALayer * imgLayer    = [CALayer layer]; 
    imgLayer.contents     = nsimage;

The reason for that is that otherwise (IIRC) the EXIF orientation flags would 
not be heeded correctly by the CALayer.

Is there a better way to achieve this?

Best, G.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to