¡@

Home 

2014/10/15 ¤U¤È 10:11:13

iphone Programming Glossary: luminosity

Fragment Shader - Average Luminosity

http://stackoverflow.com/questions/12168072/fragment-shader-average-luminosity

Shader Average Luminosity Does any body know how to find average luminosity for a texture in a fragment shader I have access to both RGB and YUV textures the Y component in YUV is an array and I want.. the pixels from that back onto the CPU and did a last quick iteration over the remaining few to arrive at the final luminosity value. For a 640x480 video frame this process yields a luminosity value in ~6 ms on an iPhone 4 and I think I can squeeze.. over the remaining few to arrive at the final luminosity value. For a 640x480 video frame this process yields a luminosity value in ~6 ms on an iPhone 4 and I think I can squeeze out a 1 2 ms reduction in that processing time with a little tuning...

How to tint a transparent PNG image in iPhone?

http://stackoverflow.com/questions/3514066/how-to-tint-a-transparent-png-image-in-iphone

context kCGBlendModeNormal CGContextDrawImage context rect myIconImage.CGImage tint image loosing alpha the luminosity of the original image is preserved CGContextSetBlendMode context kCGBlendModeColor tintColor setFill CGContextFillRect context.. tint color CGContextSetBlendMode context kCGBlendModeNormal tintColor setFill CGContextFillRect context rect replace luminosity of background ignoring alpha CGContextSetBlendMode context kCGBlendModeLuminosity CGContextDrawImage context rect myIconImage.CGImage.. context kCGBlendModeDestinationIn CGContextDrawImage context rect myIconImage.CGImage If you don't care for luminosity as you just have got an image with an alpha channel that should be tinted with a color you can do it in a more efficient..

Converting a UIImage black'n white and not grayscale for using tesseract

http://stackoverflow.com/questions/9992078/converting-a-uiimage-blackn-white-and-not-grayscale-for-using-tesseract

i.size YES 1.0 CGRect imageRect CGRectMake 0 0 i.size.width i.size.height Draw the image with the luminosity blend mode. i drawInRect imageRect blendMode kCGBlendModeLuminosity alpha 1.0 Get the resulting image. UIImage filteredImage..