Inverted pattern image with CIFilter
Inverted pattern image with CIFilter
- Subject: Inverted pattern image with CIFilter
- From: Graham Cox <email@hidden>
- Date: Mon, 17 Sep 2012 15:09:11 +1000
Hi all,
I'm wondering if anyone else has run into this, or if I'm doing something wrong.
If I use an image to create a pattern with NSColor, and later that pattern is used to render through a Core Image filter, the pattern image is inverted (flipped).
If I do the same using a single image rendered using NSImage through much the same pathway, it is not flipped. I've tried forcing a flipped context using a transform while creating the image, as well as setting -setFlipped:YES on the image, but it makes no difference to patterns (these settings do affect ordinary images).
Is it possible that because patterns are often simple repeating symmetrical elements this just hasn't been noticed before?
I would post the code but to be honest it's quite complex, since the way it works is that a temporary bitmap image is created to "capture" some on-the-fly rendering done elsewhere, and then this image is used as a source image for a CIFilter stack. The resulting CIImage is then drawn in place of the original captured rendering. But, since the only thing coming through flipped are image patterns, and that is NOT treated as a special case in this pathway, I'm thinking it could be a bug in Core Image.
--Graham
_______________________________________________
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