¡@

Home 

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

iphone Programming Glossary: self.cgimage

images from documents asynchronous

http://stackoverflow.com/questions/12096338/images-from-documents-asynchronous

@end UIIMage Decode.m #import UIImage Decode.h @implementation UIImage Decode UIImage decodedImage CGImageRef imageRef self.CGImage CGColorSpaceRef colorSpace CGColorSpaceCreateDeviceRGB CGContextRef context CGBitmapContextCreate NULL CGImageGetWidth..

Extract a part of UIImageView

http://stackoverflow.com/questions/14042260/extract-a-part-of-uiimageview

fromRect.size.width self.scale fromRect.size.height self.scale CGImageRef imageRef CGImageCreateWithImageInRect self.CGImage fromRect UIImage crop UIImage imageWithCGImage imageRef scale self.scale orientation self.imageOrientation CGImageRelease..

How to get the RGB values for a pixel on an image on the iphone

http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone

in the specified color space. CGRect rect 0 0 self.size.width self.size.height CGContextDrawImage context rect self.CGImage Now we can get a pointer to the image pixelData associated with the bitmap context. pixelData RGBAPixel CGBitmapContextGetData..

iPhone: Changing CGImageAlphaInfo of CGImage

http://stackoverflow.com/questions/2457116/iphone-changing-cgimagealphainfo-of-cgimage

CGRect destRect CGRectMake 0 0 self.size.width self.size.height CGContextDrawImage thumbBitmapCtxt destRect self.CGImage CGImageRef tmpThumbImage CGBitmapContextCreateImage thumbBitmapCtxt CGContextRelease thumbBitmapCtxt UIImage result UIImage..

UIImage rounded corners

http://stackoverflow.com/questions/262156/uiimage-rounded-corners

CGContextDrawImage mainViewContentContext CGRectMake thumbnailPoint.x thumbnailPoint.y scaledWidth scaledHeight self.CGImage Create CGImageRef of the main view bitmap content and then release that bitmap context CGImageRef mainViewContentBitmapContext..

Create new UIImage by adding shadow to existing UIImage

http://stackoverflow.com/questions/2936443/create-new-uiimage-by-adding-shadow-to-existing-uiimage

CGContextRef shadowContext CGBitmapContextCreate NULL self.size.width self.size.height 1 CGImageGetBitsPerComponent self.CGImage 0 colourSpace kCGImageAlphaPremultipliedLast CGColorSpaceRelease colourSpace CGContextSetShadow shadowContext CGSizeMake.. shadowContext CGSizeMake 0 1 1 CGContextDrawImage shadowContext CGRectMake 0 0 self.size.width self.size.height self.CGImage CGImageRef shadowedCGImage CGBitmapContextCreateImage shadowContext CGContextRelease shadowContext UIImage shadowedImage.. shadowContext CGBitmapContextCreate NULL self.size.width 10 self.size.height 10 CGImageGetBitsPerComponent self.CGImage 0 colourSpace kCGImageAlphaPremultipliedLast CGColorSpaceRelease colourSpace CGContextSetShadowWithColor shadowContext..

resize and crop image centered

http://stackoverflow.com/questions/3955189/resize-and-crop-image-centered

newSize context UIGraphicsGetCurrentContext CGContextDrawImage context CGRectMake 0 0 newSize.width newSize.height self.CGImage outputImage UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext inputSize newSize constrain crop rect to..

UIImage with transparent rounded corners

http://stackoverflow.com/questions/4885713/uiimage-with-transparent-rounded-corners

height cornerHeight CGContextClosePath context CGContextClip context CGContextDrawImage context CGRectMake 0 0 w h self.CGImage CGImageRef imageMasked CGBitmapContextCreateImage context CGContextRelease context CGColorSpaceRelease colorSpace newImage..

iOS UIImagePickerController result image orientation after upload

http://stackoverflow.com/questions/5427656/ios-uiimagepickercontroller-result-image-orientation-after-upload

above. CGContextRef ctx CGBitmapContextCreate NULL self.size.width self.size.height CGImageGetBitsPerComponent self.CGImage 0 CGImageGetColorSpace self.CGImage CGImageGetBitmapInfo self.CGImage CGContextConcatCTM ctx transform switch self.imageOrientation.. NULL self.size.width self.size.height CGImageGetBitsPerComponent self.CGImage 0 CGImageGetColorSpace self.CGImage CGImageGetBitmapInfo self.CGImage CGContextConcatCTM ctx transform switch self.imageOrientation case UIImageOrientationLeft.. CGImageGetBitsPerComponent self.CGImage 0 CGImageGetColorSpace self.CGImage CGImageGetBitmapInfo self.CGImage CGContextConcatCTM ctx transform switch self.imageOrientation case UIImageOrientationLeft case UIImageOrientationLeftMirrored..

iPhone CGContextRef CGBitmapContextCreate unsupported parameter combination

http://stackoverflow.com/questions/5545600/iphone-cgcontextref-cgbitmapcontextcreate-unsupported-parameter-combination

newSize.height CGRect transposedRect CGRectMake 0 0 newRect.size.height newRect.size.width CGImageRef imageRef self.CGImage CGContextRef bitmap CGBitmapContextCreate NULL newRect.size.width newRect.size.height CGImageGetBitsPerComponent imageRef..

Creating mask with CGImageMaskCreate is all black (iphone)

http://stackoverflow.com/questions/633051/creating-mask-with-cgimagemaskcreate-is-all-black-iphone

CGContextDrawImage mainViewContentContext CGRectMake thumbnailPoint.x thumbnailPoint.y scaledWidth scaledHeight self.CGImage Create CGImageRef of the main view bitmap content and then release that bitmap context CGImageRef mainViewContentBitmapContext..

How can I tint a UIImage with gradient?

http://stackoverflow.com/questions/8098130/how-can-i-tint-a-uiimage-with-gradient

CGRect rect CGRectMake 0 0 self.size.width scale self.size.height scale CGContextDrawImage context rect self.CGImage Create gradient UIColor colorOne colorsArr objectAtIndex 1 top color UIColor colorTwo colorsArr objectAtIndex 0 bottom color.. CGGradientCreateWithColors space __bridge CFArrayRef colors NULL Apply gradient CGContextClipToMask context rect self.CGImage CGContextDrawLinearGradient context gradient CGPointMake 0 0 CGPointMake 0 self.size.height scale 0 UIImage gradientImage..

Blur an UIImage on change of slider

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

UIImage blurredImageUsingGaussFactor NSUInteger gaussFactor andPixelRadius NSUInteger pixelRadius CGImageRef cgImage self.CGImage const size_t originalWidth CGImageGetWidth cgImage const size_t originalHeight CGImageGetHeight cgImage const size_t bytesPerRow..