¡@

Home 

2014/10/15 ¤U¤È 10:04:42

iphone Programming Glossary: bpp

Getting RGB pixel data from CGImage

http://stackoverflow.com/questions/6073259/getting-rgb-pixel-data-from-cgimage

width CGImageGetWidth cgimage size_t height CGImageGetHeight cgimage size_t bpr CGImageGetBytesPerRow cgimage size_t bpp CGImageGetBitsPerPixel cgimage size_t bpc CGImageGetBitsPerComponent cgimage size_t bytes_per_pixel bpp bpc CGBitmapInfo.. cgimage size_t bpp CGImageGetBitsPerPixel cgimage size_t bpc CGImageGetBitsPerComponent cgimage size_t bytes_per_pixel bpp bpc CGBitmapInfo info CGImageGetBitmapInfo cgimage NSLog @ n @ n CGImageGetHeight d n CGImageGetWidth d n CGImageGetColorSpace.. s n kCGBitmapByteOrder16Big s n kCGBitmapByteOrder32Big s n file int width int height CGImageGetColorSpace cgimage int bpp int bpc int bpr unsigned info info kCGBitmapAlphaInfoMask YES NO info kCGBitmapFloatComponents YES NO info kCGBitmapByteOrderMask..

Blur an UIImage on change of slider

http://stackoverflow.com/questions/8758433/blur-an-uiimage-on-change-of-slider

context size_t height CGBitmapContextGetHeight context size_t bpr CGBitmapContextGetBytesPerRow context size_t bpp CGBitmapContextGetBitsPerPixel context 8 CGRect rect 0.0f 0.0f width height CGContextDrawImage context rect cgImage Now.. gauss_sum gauss_fact radius 1 2 unsigned char p1 p2 p3 for size_t y 0 y height y for size_t x 0 x width x p1 srcData bpp y width x p2 destData bpp y width x for i 0 i gaussFactor i sums i 0 for k 0 k radius k if y radius 1 1 k height p1.. 1 2 unsigned char p1 p2 p3 for size_t y 0 y height y for size_t x 0 x width x p1 srcData bpp y width x p2 destData bpp y width x for i 0 i gaussFactor i sums i 0 for k 0 k radius k if y radius 1 1 k height p1 srcData bpp y radius 1 1 k..