| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
A short follow up to my previous post: If I use the CIImage instance directly, e.g. in the -drawRect: method of a custom NSView subclass – something like - (void)drawRect:(NSRect)rect { if( _image ) { CIContext *context = [[NSGraphicsContext currentContext] CIContext]; CGRect cg = CGRectMake(NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect)); if( context ) { [context drawImage:_image atPoint:cg.origin fromRect:cg]; } } } the image gets drawn correctly. (And I forget to mention in my previous mail that the cropped and converted NSImage instances, when logged to console, had the right values in the origin portion of the extent struct, like NSImage 0x3e2d30 Size={144, 108} Reps=( NSCIImageRep 0x3eee10 Size={144, 108} ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=144x108 Alpha=NO CIImage={CIImage [0 19 144 108]} )) So it seems the "incorrect" behavior i'm experiencing stems from the conversion of the CIImage instance to an instance of class NSImage as done in the code I've posted before!(?) Comments? Thanks in advance, Thomas |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartz-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartz-dev/email@hidden This email sent to email@hidden
| References: | |
| >Core Image and CICrop (From: Thomas Schnitzer <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.