title: Uploading image on server, receiving rotated image
body: <p>In my application I want to upload the image to the server and retrieve the url of uploaded image to display it in the application. I send the NSData of image. Here is my code :</p>
  
  <pre><code>AsynchronousImageView *imgVw_User = (AsynchronousImageView*)[self.view viewWithTag:K_TagImageViewUser];
  UIImage *UserImgForBioData = imgVw_User.image;
  UserImgForBioData = [UIImage imageWithCGImage:UserImgForBioData.CGImage scale:1.0f orientation:UserImgForBioData.imageOrientation];
  NSData *imageData = [NSData dataWithData:UIImageJPEGRepresentation(UserImgForBioData,0.5)];
  
   Base64Transcoder *temp_transcoder=[[Base64Transcoder alloc]init];
  NSString * temp_base64EncodedImage= @"";
  if (imageData!=nil)
      {
          temp_base64EncodedImage = [NSString stringWithFormat:@"%@",[temp_transcoder base64EncodedStringfromData:imageData]];
         temp_base64EncodedImage = [[temp_base64EncodedImage stringByReplacingOccurrencesOfString:@"\n"
                                             withString:@""]
                                           mutableCopy];
        }
  </code></pre>
  
  <p>Sometime when I display the image, by fetching the url of the image, the image gets rotated. Am I doing something wrong?</p>