0

我有以下代码水平并排合并两张图片:

        CGFloat firstWidth = ImageLeft.size.width;
        CGFloat firstHeight = ImageLeft.size.height;


        CGFloat secondWidth = ImageRight.size.width;
        CGFloat secondHeight = ImageRight.size.height;

        CGSize sizetoNewImage = CGSizeMake(firstWidth+secondWidth , firstHeight); // Here merging two images horizontally ,

        UIGraphicsBeginImageContext(sizetoNewImage);

        [ImageLeft drawInRect : CGRectMake(0,0,firstWidth,firstHeight)];
        [ImageRight drawInRect:CGRectMake(firstWidth,0,secondWidth,secondHeight)];// Here merging two images horizontally ,

        backgroundImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

问题是当我显示 backgroundImage 时,它​​的所有文本都模糊了。虽然,如果我显示单独的图像,这些图像用于连接到一个图像中 - 它们显示所有文本都很好。我在那里想念什么???

提前致谢

4

1 回答 1

2

另一个答案,使用视网膜图像时,使用以下内容创建图像上下文。

UIGraphicsBeginImageContextWithOptions(size, NO, 0.0f); // 0.0 means [UIScreen mainScreen].scale
于 2013-04-25T18:22:01.653 回答