I send an UIImage on my server, but when I reveive it, the image is rotated by 90°. I maked this with the following code :
UIImageView *iv = [[UIImageView alloc] initWithImage:screenshot];
iv.center = CGPointMake(100.0, 100.0);
iv.transform = CGAffineTransformMakeRotation(3.14159265/2);
NSData *imageData = UIImagePNGRepresentation(iv.image);
// on créé la requete
NSURL *url = [NSURL URLWithString:@"http://myserver/test.php"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setData:imageData withFileName:@"tmp.png" andContentType:@"image/png" forKey:@"userfile"];
[request setRequestMethod:@"POST"];
[request setDelegate:self];
[request startAsynchronous];
As you can see, I try to rotate the UIImageView but there is no change when I display the UIImage on the server.
Thanks in advance.
EDIT : The image is taken with the method takePicture.