Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9241133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:18:56+00:00 2026-06-18T08:18:56+00:00

Ive been trying to use the sanselan library for android to properly update my

  • 0

Ive been trying to use the sanselan library for android to properly update my images rotation data but I cant get it to work. I was wondering if anybody on here has gotten this to work. Ive been on SO all day checking out answers to similar questions but nothing seemed to work yet. On both a galaxy s3 and motorola razor m I always get a landscape rotation embedded in the pic for some reason. Ive set the rotation property in the Parameters that I assign to my camera and everything but its still not working out. Does anyone have any idea, links, or examples on how they successfully manually updated the Exif data in an image in android?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:18:57+00:00Added an answer on June 18, 2026 at 8:18 am

    Some device, such as Galaxy S3, Note2 gives a rotated image. To get the image correctly
    follow the steps belove:

    1. Rotate the bitmap using the orientation exif info
    2. Set the proper value to image exif orientation

    If I see well, your problem comes out on step 2. If you try to update exif orientation, Sanselan will duplicate orientation attribute. So first of all, you have to remove the orientation values, and after add the value. I’ve worked out this way:

                List<?> sourceDirectories = outputSet.getDirectories();
                for (int i = 0; i < sourceDirectories.size(); i++) {
                    TiffOutputDirectory sourceDirectory = (TiffOutputDirectory) sourceDirectories.get(i);
    
                    List<?> sourceFields = sourceDirectory.getFields();
                    for (int j = 0; j < sourceFields.size(); j++) {
                        TiffOutputField sourceField = (TiffOutputField) sourceFields.get(j);
                        if (sourceField.tagInfo.name.equals("Orientation")) {
                            sourceDirectory.removeField(sourceField.tagInfo);
                        }
                    }
                }
    
                TiffOutputDirectory tiffDirectory = outputSet.getExifDirectory();
                TiffOutputField orientationField = TiffOutputField.create(TiffConstants.EXIF_TAG_ORIENTATION, outputSet.byteOrder, 1);
                tiffDirectory.add(orientationField);
    

    This article could help you in orientation value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi ive been trying to use System.Security.Cryptography to encrypt and decrypt a file but
I've been trying to use mongo with some data imported, but I'm not able
Ive been trying to get sqlite to use an index with a like to
Ive been trying to get the VIM auto completion working, but am running into
Im trying to use the WriteFile function. Ive been working off this example http://msdn.microsoft.com/en-us/library/ms900134.aspx
I've been trying to use the new jquery-ui, and all but the resizable function
I've been trying to use SWIG to wrap around a simple library that uses
ive been trying to use node.js to iterate through an array of cities and
I've been trying to use cursor loader.I started following this tutorial http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html but could
I've been trying to use the THREE.ShaderUtils.lib[normal] normal mapping shader, but the lights are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.