我正在尝试渲染一个位图,以保存到用户的照片相册中,该位图必须具有比320x480 iPhone屏幕更高的分辨率(但仍在iOS内存限制范围内)。 然而,使用以下代码创建上下文:
UIGraphicsBeginImageContext(CGSizeMake(finalImgWidth, finalImgHeight));
CGContextRef ctx = UIGraphicsGetCurrentContext();
或者使用CG模拟:
CGContextRef ctx = CGBitmapContextCreate(rawData, finalImgWidth, finalImgHeight, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast);
如果宽度或高度大于320x480,则返回nil上下文。
是否还有其他方法创建高分辨率图像?
注意:我已经知道如何正常绘制内容并进行屏幕截图。我需要一个可以缩放到典型照片分辨率的解决方案。