UIImagePNGRepresentation and masked images
I created a masked image using a function form an iphone blog: UIImage *imgToSave = [self maskImage:[UIImage imageNamed:@"pic.jpg"] withMask:[UIImage imageNamed:@"sd-face-mask.png"]]; Looks good in a UIImageView UIImageView *imgView = [[UIImageView alloc] initWithImage:imgToSave]; imgView.center = CGPointMake(160.0f, 140.0f); [self.view addSubview:imgView]; UIImagePNGRepresentation to save to disk : [UIImagePNGRepresentation(imgToSave) writeToFile:[self findUniqueSavePath] atomically:YES]; UIImagePNGRepresentation returns NSData of an image that looks different. The output is inverse image