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 6202735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:47:29+00:00 2026-05-24T04:47:29+00:00

Is my second question on this topic today but on the previous one it

  • 0

Is my second question on this topic today but on the previous one it seems I haven’t been clear enough.

I have an activity where I’m building my own camera in order to take pictures.
In the onCreate() method of this activity I’m doing something like:

this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

otherwise my whole screen looks like this:
.Anyway this solves my issues for the moment and the image is looking good.

After taking the picture I’m using a bundle and send the image to another activity(Activity B) where I edit the picture and after that save the image to a website.

And here is the problem:
The picture received in this activity is again orientated wrong like here:
![enter image description here][1] because I haven’t done any operations upon the image itself, only on the activity orientation.

Now, I could do in here barely the same thing and set the activity in the LANDSCAPE mode and my activity would be looking good again, but further more when I upload the image to a website this would look wrong on the website for the simple fact that I haven’t done anything to set her own orietntation.

So, in my surfaceChanged() – in the activity A , the first one, method I’ve done something like this:

Camera.Parameters p = mCamera.getParameters();
 p.set("orientation", "landscape");
 p.setRotation(90);
 mCamera.setParameters(p);

But this has no effect on the image, it looks the same.

I’m working on Sony Ericsson and need help on rotating my image-not setting up the orientation of my activity!

Thank you, I’m here for further details.Thanks

EDIT:
In activity A where I’m taking the image I’m doing this:

Camera.PictureCallback mPictureCallback = new Camera.PictureCallback(){
        public void onPictureTaken(byte[] imageData, Camera c) {

            if (imageData != null) {

                Intent mIntent = new Intent();

                //StoreByteImage(mContext, imageData, 50, "ImageName");
                mCamera.startPreview();

                Bundle b = new Bundle();
                b.putByteArray("imageData", imageData);
                Intent i = new Intent(mContext,ImageDisplayActivity.class);
                i.putExtras(b);
                startActivity(i);

                setResult(FOTO_MODE, mIntent);
                finish();

            }
        }
    };

And in activity B where I’m receiving the image I’m doing this:

Bundle extras = getIntent().getExtras();
 BitmapFactory.Options options=new BitmapFactory.Options();
        options.inSampleSize = 5;
        byte[] imageData = extras.getByteArray("imageData");
        Bitmap myImage = BitmapFactory.decodeByteArray(imageData , 0, imageData.length,options);
....///is set up the bitmap to an imageview
  • 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-05-24T04:47:29+00:00Added an answer on May 24, 2026 at 4:47 am

    Ok I have a hunch that you are overestimating the problem!

    Try to rotate myImage before uploading

    Matrix mat = new Matrix();
    mat.postRotate(90);
    image_to_upload = Bitmap.createBitmap(myImage, 0, 0, myImage.getWidth(), myImage.getHeight(), mat, true);
    

    Try different angles I am sure this is the issue and you will find the right path

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

Sidebar

Related Questions

I hope it's the heat, this is the second question today and it's one
This is my second question on Bamboo ( My First One ). My understanding
This is a second-hand question from an OS development site, but it made me
(second question today - must be a bad day) I have a dataframe with
Second question in two days on this same sort of topic. I currently am
I asked a pretty similar question a few days ago, but this one is
This is my second question about this topic, the original question can be found
I am aware that this topic has been covered already in many places, but
My question was not specific enough last time, and so this is second question
So, my second question based off of this application I'm teaching myself Objective C

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.