我有以下问题 - 我有两个300dpi的高分辨率图像。我想从两个高分辨率图像中创建新图像。我使用以下代码:
我生成了这样的新图像:
NSString *fileName = @"imageOne.jpeg";
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [path objectAtIndex:0];
NSString *imgPathWithFileName = [documentDirectory stringByAppendingPathComponent:fileName];
// [UIImagePNGRepresentation(finalImage) writeToFile:imgPathWithFileName atomically:YES];
[UIImageJPEGRepresentation(imageOne, 1) writeToFile:imgPathWithFileName atomically:YES];
NSLog (@"Success!");
问题是新图像是72dpi。为什么组成新镜头的图像每个都是300dpi?如何使用300dpi创建图像,任何想法?