equal
deleted
inserted
replaced
136 |
136 |
137 // Create a new UIImage object |
137 // Create a new UIImage object |
138 UIImage *newImage = [UIImage imageWithCGImage:imageRef]; |
138 UIImage *newImage = [UIImage imageWithCGImage:imageRef]; |
139 |
139 |
140 // Release colorspace, context and bitmap information |
140 // Release colorspace, context and bitmap information |
|
141 CFRelease(imageRef); |
|
142 CGContextRelease(context); |
141 CGColorSpaceRelease(colorSpace); |
143 CGColorSpaceRelease(colorSpace); |
142 CGContextRelease(context); |
|
143 CFRelease(imageRef); |
|
144 |
144 |
145 // Return the new grayscale image |
145 // Return the new grayscale image |
146 return newImage; |
146 return newImage; |
147 } |
147 } |
148 |
148 |