我有一个UIImage (Cocoa Touch)。从那里,我很高兴得到一个CGImage或任何你想要的可用的东西。我想写这个函数:
- (int)getRGBAFromImage:(UIImage *)image atX:(int)xx andY:(int)yy {
// [...]
// What do I want to read about to help
// me fill in this bit, here?
// [...]
int result = (red << 24) | (green << 16) | (blue << 8) | alpha;
return result;
}