"Convert UIImage to NSData" UIImage *img = [UIImage imageNamed:@"some.png"]; NSData *dataObj = UIImageJPEGRepresentation(img, 1.0);