Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color values from a CGImage




On Mar 1, 2008, at 2:10 AM, Marcel Borsten wrote:

Thanks for the response, I'll elaborate a bit on what I'm trying to do:

I have to images that I run through a CIFilter (CIDifferenceBlendMode), the result of this filter goes through another filter (CIAreaAverage), which returns a single pixel image that represents the average color value of the difference blend. If the result is a black pixel, the images were the same. Anything other then black means there was a difference. I want to measure the RGB values of the result of th average filter so I can assess how much difference there was, so I'm looking for a way to represent the RGB values in numbers.


The only way you are going to be able to get the results of the filter is by drawing the image (thereby running the filters).

A common technique for something like that is to use a 1 pixel bitmap context and draw the image into the context in such a way that the pixel you want to examine is the one drawn in the bitmap.

It seems you could very easily reuse the bitmap context with it's one pixel's worth of information.

Scott

 _______________________________________________
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: 
 >Re: Color values from a CGImage (From: Marcel Borsten <email@hidden>)



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.