Android Question Save Rotated ImageView

Dogbonesix

Active Member
Licensed User
Longtime User
Using the BitMapExtended library the code below rotates an imageview:

' Where btmpex is a Global (Dim btmpex As BitmapExtended); btmp is a Global (Dim btmp As Bitmap); RotV is a Global set to 0 at Activity_Create

Sub Label1_Click
RotV = RotV + 90
If RotV > 270 Then RotV = 0
imgView.Bitmap = btmpex.rotateBitmap(btmp,RotV) '
End Sub

My question is - how do I save the ROTATED imageview to a Directory/FileName? It seems that File.OpenOutput would be a place to start - bit I can not figure it out. Any help would be appreciated.
 

Dogbonesix

Active Member
Licensed User
Longtime User
The ImageView rotates like a champ BUT the "Bitmap1.WriteToStream(out, 100, "PNG")" does not save the rotated view as seen in the ImageView. For me - Test.png appears the same as before it was rotated however the ImageView is rotated. There is some small (very small) difference in the size between the original and the ...WriteToStream Test.png, so I guess something happened. If you have a sample of code where the ImageView can be saved to a file - it would be great. I may doing it the right way but just don't see it OR doing it completely wrong and still do see it. Thanks
 
Upvote 0
Top