Top "Cgimage" questions

CGImage represents a drawable image object in Core Graphics (the low-level procedural drawing API for iOS and Mac OS X).

Convert image to grayscale

I am trying to convert an image into grayscale in the following way: #define bytesPerPixel 4 #define bitsPerComponent 8 -(unsigned char*) …

iphone cocoa-touch cgimage
Turning an NSImage* into a CGImageRef?

Is there an easy way to do this that works in 10.5? In 10.6 I can use nsImage CGImageForProposedRect: NULL context: NULL …

objective-c cocoa core-graphics nsimage cgimage
Saving CGImageRef to a png file?

in my Cocoa application, I load a .jpg file from disk, manipulate it. Now it needs to be written to …

cocoa png core-graphics cgimage
Getting a CGImage from CIImage

I have a UIImage which is loaded from a CIImage with: tempImage = [UIImage imageWithCIImage:ciImage]; The problem is I need …

ios core-graphics core-image cgimage ciimage
Getting RGB pixel data from CGImage

I am trying to access pixel data from a CGImage. I want to be able to access the RGB values …

iphone ios cgimage
How to create empty/blank UIImage or CGImage and manipulate pixels on it (Xcode)?

I have following problem and only could solve it partially yet. I am working with XCode 3.2.5, developing for iOS 4+. I …

iphone xcode uiimage pixel cgimage
iPhone CGContextRef CGBitmapContextCreate unsupported parameter combination

In my application I need to resize and crop some images, stored locally and online. I am using Trevor Harmon's …

iphone uiimage cgcontext cgimage cgbitmapcontextcreate
How do I create a UIImage from a CGImage in Swift?

I'm trying to create a UIImage from the ALAssetsGroup#posterImage method. In Objective-C, I could simply call [UIImage imageWithCGImage:group.…

ios swift uiimage core-foundation cgimage
Rotating a CGImage

I have a UIImage that I'm getting from a UIImagePickerController. When I receive the image from the - (void)imagePickerController:(…

objective-c ios uiimage cgimage
Get pixel data as array from UIImage/CGImage in swift

I have an app so far that allows the user to free draw (like a sketch pad) on a UIImageView …

ios swift uiimage cgimage