Android Question Strange behaivor when rotating image

TrisectDevelopment

Active Member
Licensed User
I'm trying to rotate an image to show direction(0 - 360) but something strange happens.

This is my code:
B4X:
    Dim rbmp As RSImageProcessing
    Dim finalBitmap As Bitmap

    '** Roter center billedet
    ivCenter.Bitmap = StartCenterBitmap    '** Hent gemt bitmap
    rbmp.Initialize
  
    finalBitmap = ivCenter.Bitmap
    finalBitmap = rbmp.rotateBitmap(finalBitmap, direction)
    ivCenter.Bitmap = finalBitmap

When I start the App i take a copy of the image and put it into StartCenterBitmap so I allways have the same image to start with when I rotate.

But every time I run this code the image change size (scale) and I don't know why.

center.png

This is my image. Its a white circle with an arrow showing the direction.
This image is in an ImageView with the size of 330x330

I try to insert this line in my code but with no difference.

B4X:
finalBitmap = rbmp.scaleBitmap(finalBitmap, 1.3, 1.3)
 
Last edited:

eurojam

Well-Known Member
Licensed User
you can combine buttons and labels together with a canvas, but can you specify how you want to combine them. should they rotate too?
 
Upvote 0

eurojam

Well-Known Member
Licensed User
then you should try it. :)
I used it for a compass like app and it is the best way to do it, don't use image processing for that.
 
Upvote 0
Top