Created
October 5, 2011 02:59
-
-
Save Nub/1263514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString * path = [[NSBundle mainBundle] pathForResource:@"filename" ofType:@"jpg"]; | |
| UIImage * img = [[UIImage alloc]initWithContentsOfFile:path]; | |
| CGImageRef image = [img CGImage]; | |
| CFDataRef data = CGDataProviderCopyData(CGImageGetDataProvider(image)); | |
| const unsigned char * buffer = CFDataGetBytePtr(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment