objective c - Making a UIImageView grey -


I am setting up UImageView within table cells using setImageWithUrl from FM network, but I need images greyscale ... Is there any way I can do this. I have tried some UIImage greyscale converters, but I think they do not work because I'm doing some such settings that have not been downloaded yet.

try this method:

  - (UIImage *) ConvertMagicogracecale : (UIImage *) Image {// Create the image rectangle with the current image width / height Cgarte image = CGRactam (0, image, size, images, height); // Grayscale color space CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray (); // Create bitmap content with the size of the current image and the layers of colors CJCTextText = CGITMAPContactText (Zero, ImagesizeWith, ImageSizeHight, 8, 0, ColorSpace, KCGImageAlpha Non); // Paint the image in the current context, with the specified rectangle (with grayscale color space) with the previously defined reference (CGContextDrawImage) (reference, imageRect, [Image CGImage]); // Create bitmap image information from pixel data in current reference CGImageRef imageRef = CGBitmapContextCreateImage (reference); // Create a new UIImage object UIImage * newImage = [UIImage imageWithCGImage: imageRef]; // release color space, context and bitmap information CGColorSpaceRelease (colorSpace); CGContextRelease (reference); CFRelease (imageRef); // New grayscale image return Return new image; }   

I found it here:

Comments