title: IOS UIImage Image upside down
body: <p>if i draw my image I fixed the problem use CGAffintrasform</p>
  
  <pre><code>CGAffineTransform myTr = CGAffineTransformMake(1, 0, 0, -1, 0, backImage.size.height);
  CGContextConcatCTM(context, myTr);
  [backImage drawInRect:CGRectMake(cbx, -cby, backImage.size.width, backImage.size.height)];
  myTr = CGAffineTransformMake(1, 0, 0, -1, 0, backImage.size.height);
  CGContextConcatCTM(context, myTr);
  </code></pre>
  
  <p>when i wanna write to file
  i use this</p>
  
  <pre><code> NSData *imageData = UIImageJPEGRepresentation(backImage, 0);  
  </code></pre>
  
  <p>then Image upside down
  how ?</p>