How to merge two images after rotate the image?
<p><img src="http://i.stack.imgur.com/StX9q.png" alt="enter image description here"></p>

<p>After rotate the image how to merge the rotation image? I using the below code, Its work fine for before the image rotation. How to fix this issue . Please help me. Thanks in advance.</p>

<pre><code>CGRect backgroundImageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height);
CGRect foregroundImageRect = CGRectMake(rsImageView.frame.origin.x, rsImageView.frame.origin.y, rsImageView.frame.size.width, rsImageView.frame.size.height);

[backgroundImageView.image drawInRect:backgroundImageRect];
[rsImageView.image drawInRect:foregroundImageRect];
overlappedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
</code></pre>
