android Matrix.postRotate() method makes the image size larger
<pre><code>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());
</code></pre>

<p>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</p>

<pre><code>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
</code></pre>

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

<p>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!</p>
