I want to change the color where user touch on image. I got some code to get the image data which is below
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);
I know I can easily get the touch point but my questions are below
- As we know in retina display 1 point = 2 pixel so, do I know need to change the colour of 2 pixel for single touch point? Please correct me If I am wrong anywhere?
- How to get this two pixel from image data?