Android Question Same issue... Rotated camera pictures.

Discussion in 'Android Questions' started by tigrot, Jun 4, 2015.

  1. tigrot

    tigrot Well-Known Member Licensed User

    Hi everybody,
    I'm fighting with an APP saving pictures rotated by 270°( or better -90°). I have seen that Samsung smartphones seem to save portrait taken photos rotated with an exif header indicating that photo is rotated. I don't know if other phones do the same.
    I save the images on a web server. Internet Explorer doesn't care about exif so images looks rotated, while Chrome and Firefox show the images correctly.
    Any way to save in portrait with no rotation? The images are very large and processing can be long. I use CameraExClass V.1.20. I have seen much code, but nothing not starting from a saved image

    Best regards and thank you in advance.
    Mauro Zanin
    Loic Data
  2. Erel

    Erel Administrator Staff Member Licensed User

    The camera library returns the image data exactly as it comes from the native API.

    You can use the Jpeg library to check the exif headers and if needed load the bitmap, rotate it and save it again.
  3. tigrot

    tigrot Well-Known Member Licensed User

    Thank you I'll give a try... Rotation modifies EXIF header too or I have to do manually?

    Have a nice week-end.

  4. tigrot

    tigrot Well-Known Member Licensed User

    Hi Erel
    seems I'm not able to rotate the image, 'cause of a memory overflow. I'll change on server side...
  5. Erel

    Erel Administrator Staff Member Licensed User

    I assume that the exif headers are correct. The problem is that some viewers ignore them at all.
  6. tigrot

    tigrot Well-Known Member Licensed User

    You are correct. IEXPLORER ignores everything!
    I have solved my issue on server side. The server side is a small PHP script which in turns launch JPEG Lossless Rotator. It scans a whole directory, the one I just send and automatically rotate each image according EXIF data. Quick and clean solution, which gives the best quality ever!
    Thank you Erel, you always have an Hint ready for us!

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice