This is expected behavior, and Doug's assumption is right. JPEG images may contain EXIF <http://en.wikipedia.org/wiki/Exchangeable_image_file_format>data blocks that also specify the orientation of the image. On your server you need to read the orientation data and use it to rotate the image into the opposite direction. If your server code is written in PHP you can use the Imagick library and the following functions for determining the orientation and rotating the image respectively:Imagick::getImageOrientation()<http://www.php.net/manual/en/imagick.getimageorientation.php>, Imagick::rotateImage()<http://www.php.net/manual/en/imagick.rotateimage.php> . If the server software is written in Java you could use a library such as Metadata-Extractor <http://code.google.com/p/metadata-extractor/> for reading the orientation and any image processing library of your choice for rotating the image.
On Tuesday, March 25, 2014 1:07:37 AM UTC-5, Jags wrote: > > Hi All, > > I tried to capture an image and send it to server in my app. I did that > using camera intent. the problem is in my samsung galaxy s4 device the > image is rotated -90 degree by default. I read around web that it is a > problem with the samsung devices. But what is the best solution to it ? if > i rotate the image after capture, it becomes heavy image processing in my > app. What is the best approach to resolve this ? > > in phonegap there is something like correctOrientation = true / false > what's its counterpart in native code ? > > thanks and regards > jags > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.