There is a statement in android canvas.drawBitmap(visiblePage, 0, 0, paint);
When I add canvas.rotate(90)
, there is no effect. But if I write
canvas.rotate(90) canvas.drawBitmap(visiblePage, 0, 0, paint);
I get no bitmap drawn. So what am I not doing right?
To change the photo's perspective, tap Transform . Drag the dots to the edges of your desired photo or tap Auto. To rotate a photo 90 degrees, tap Rotate . To make minor adjustments to straighten the photo, use the dial above Rotate .
You can also try this one
Matrix matrix = new Matrix(); matrix.postRotate(90); Bitmap scaledBitmap = Bitmap.createScaledBitmap(bitmapOrg, width, height, true); Bitmap rotatedBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight(), matrix, true);
Then you can use the rotated image to set in your imageview through
imageView.setImageBitmap(rotatedBitmap);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With