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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:33:34+00:00 2026-06-17T07:33:34+00:00

OverlayObject overlayObject = overlayObjects.get(index); Bitmap dotIndicator = overlayObject.DTO.dotIndicatorBitmap; int width = dotIndicator.getWidth(); int height

  • 0
OverlayObject overlayObject = overlayObjects.get(index);
Bitmap dotIndicator = overlayObject.DTO.dotIndicatorBitmap;

int width = dotIndicator.getWidth();
int height = dotIndicator.getHeight();

Log.d("dotIndicator.getWidth()", "" + width);
Log.d("dotIndicator.getHeight()", "" + height);

Matrix matrix = new Matrix();
matrix.postRotate(gbConstants.dotIndicatorRotationFactor, width/2, height/2);

Bitmap newBitmap = Bitmap.createBitmap(dotIndicator, 0, 0,
    width, width, matrix, true);

Log.d("newBitmap.getWidth()", "" + newBitmap.getWidth());
Log.d("newBitmap.getHeight()", "" + newBitmap.getHeight());

The result of the logs:
01-15 14:46:16.485: D/dotIndicator.getWidth()(20739): 102
01-15 14:46:16.485: D/dotIndicator.getHeight()(20739): 102
01-15 14:46:16.485: D/newBitmap.getWidth()(20739): 104
01-15 14:46:16.485: D/newBitmap.getHeight()(20739): 104

01-15 14:46:16.555: D/dotIndicator.getWidth()(20739): 104
01-15 14:46:16.555: D/dotIndicator.getHeight()(20739): 104
01-15 14:46:16.555: D/newBitmap.getWidth()(20739): 106
01-15 14:46:16.555: D/newBitmap.getHeight()(20739): 106

**Note: gbConstants.dotIndicatorRotationFactor = 1 (I set it to this number to the lowest value for debugging)

Per 1 degree rotation of the image, 2 pixels were added to the width and height each time newBitmap has been created. I’ve browsed other links and questions but none have answered my question so far. I have also tried debugging over and over again to make sure that there are no other methods that reference the variables and objects that would have affected the outcome. Thanks in advance!

  • 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-17T07:33:36+00:00Added an answer on June 17, 2026 at 7:33 am

    The answer is pretty simple.
    An image which is rotated by 1° will need more space in width and height.So the outcome is completely correct. Because otherwise the corners of the picture will be cut of.

    Just take a piece of paper and rotate it and you will see how the width and height will increase until you reach 45°.

    Edit: maybe this helps you: Image changes size as it's rotated. How do I stop this?

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

Sidebar

Related Questions

$(document).ready(function() { var overlayObject = $(a[rel]).overlay({ top: 50, expose: { color: '#232323', closeOnClick: true
I have a project with Python, PyGObject (Gtk 3), and GStreamer (0.11) I have
So I've given the user controls to use a seekbar to change the radius
I'm working on this project of mine that requires to define lat/lng elements by
I have a mapView to which I add a MyLocationOverlay. It displays fine when
Im creating an app where you can toggle the FollowLocation on and off using
I have a form with a picturebox which displays a picture and some overlay
I have implemented google maps in my application. I have written my own overlay
(Using iOS 5 and Xcode 4.2.) I've followed the instructions here: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW15 and used
im working on a web app. project and i need to change intersection region

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.