IOS UIImage Image upside down
===

if i draw my image I fixed the problem use CGAffintrasform

    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);

when i wanna write to file
i use this

     NSData *imageData = UIImageJPEGRepresentation(backImage, 0);  

then Image upside down
how ?