0

I want to merge the two images(Check screenshot 1), and change to the single image. But I am mot able to merge the 3D Transformed image.

If I merge the image means, its goes to the original size(Check screenshot 2).

How can I merge the image or take screenshot for the 3D Transformed image view.

enter image description here enter image description here

I am used following code for merge the images,

-(UIImage *)captureView:(UIImageView *)imageView
{
    //Merge the two images.
    UIGraphicsBeginImageContext(backgroundImageView.frame.size);
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    [imageView.layer renderInContext:ctx];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newImage;
}
Mani
  • 1,310
  • 1
  • 20
  • 40

1 Answers1

2

To take screen shot of 3D transformed view, you need to convert 3D transformed view to affine transform and then take the screen shot

Maddy Oven
  • 125
  • 5
  • @ Maddy Oven, Can you give the procedure or source code for 3D Transform to Affine transform. Affine transform used for the 2D transform. – Mani Sep 27 '13 at 06:13
  • @Mani, There is a method "CATransform3DGetAffineTransform" of quartz core framework which takes 3D transform as input and returns you the equivalent affine transform. – Maddy Oven Sep 27 '13 at 10:59
  • @ Maddy Oven, You are great...! This method "CATransform3DGetAffineTransform" working nice. Thanks a lot. – Mani Sep 27 '13 at 11:24
  • @ Maddy Oven, rsImageView.layer.affineTransform = CATransform3DGetAffineTransform(rsImageView.layer.transform); But I got some changes on the image. This conversion change the original transformed image. Can you let me know, the reason of the issue. – Mani Sep 27 '13 at 12:31
  • @Mani: Can you provide more details on what is changed on the image? – Maddy Oven Oct 25 '13 at 06:40