title: Help rotating a UIImage
body: <p>I have to rotate a <code>UIImage</code> before I save it out to file. I've tried a number of methods, some of which seem to work for other people, but all it seems to do it turn my image solid white. Here's my code:</p>
  
  <pre><code>    CGFloat radians = 90.0f * M_PI/180;
      UIGraphicsBeginImageContext(image.size);
      CGContextRef ctx = UIGraphicsGetCurrentContext();
      CGContextConcatCTM(ctx, CGAffineTransformMakeRotation(radians));
      CGContextDrawImage(ctx, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
      image = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndImageContext();
  </code></pre>
  
  <p>Can anyone spot what I'm doing wrong? The variable "image" is a <code>UIImage</code>.</p>