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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:50:19+00:00 2026-05-24T03:50:19+00:00

I’m having an android app in which I’m taking a picture using the android

  • 0

I’m having an android app in which I’m taking a picture using the android camera.
This picture is taken in the activity A and after that is sent to activity B where is edited.

This is how I receive my image in activity B:

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);

        Matrix mat=new Matrix();
        mat.postRotate(90);
        bitmapResult = Bitmap.createBitmap(myImage, 0, 0, myImage.getWidth(), myImage.getHeight(), mat, true); 
 ImageView imageView = (ImageView) findViewById(R.id.myPic);
        imageView.setImageBitmap(bitmapResult);

As you can see I’m rotating the bitmap I receive with 90 using this:

Matrix mat=new Matrix();
            mat.postRotate(90);

And here is my imageView in xml file:

<ImageView  
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_gravity="center"
    android:id="@+id/myPic"
    />

The problem that I’m facing is that my picture is not full screen…it’s almoust full screnn but not entirly.As you can see here:

enter image description here

If you could help me to increase a little bit its size I would really apreciate it.Thanks

EDIT:I wanna increase the width of my image only.Sorry!!

  • 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-24T03:50:21+00:00Added an answer on May 24, 2026 at 3:50 am

    You might have to crop the image. Because the image is not at its full height, the width of the image is proportionately scaled down, hence the black strips at the sides.

    To be more specific, images taken using the phone’s camera are probably intended to fit the screen exactly i.e. width-height ratio of image = width-height ratio of the screen. However, in your app the height of the image is constrained by the buttons at the top, so in order to maintain the width-height ratio of the image, the width of the image is scaled down proportionately.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I am using Paperclip to handle profile photo uploads in my app. They upload
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,

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.