UIGraphicsGetImageFromCurrentImageContext drawInRectを使用してマージした2つの高解像度画像があります。ただし、メソッドは低解像度の画像を返します。助けてください。これが私のコードです。
UIGraphicsBeginImageContext(CGSizeMake(phoneSize.width, phoneSize.height));
for(int x=0;x<arr_UIImages.count;x++){
NSValue *point = [app.arr_boxPositions objectAtIndex:x];
NSValue *size = [arr_cropSizes objectAtIndex:x];
CGPoint p = point.CGPointValue;
CGSize s = size.CGSizeValue;
s.width = s.width * phoneSize.width;
s.height = s.height *phoneSize.height;
p.x = p.x * .01;
p.y = p.y * .01;
p.x = p.x *phoneSize.width;
p.y = p.y *phoneSize.height;
float xPos = p.x - (s.width/2);
float yPos = p.y - (s.height/2);
UIImage *temp = [arr_UIImages objectAtIndex:x];
[temp drawInRect:CGRectMake(xPos*2,yPos*2,temp.size.width, temp.size.height)];
}
UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(finalImage , nil, nil, nil);
画像の幅とサイズは正しいのですが、画像の dpi が低くなっています。助けてください。前もって感謝します!