Thank you, Erel, your support to dummies like me is very much appreciated. As I was only interested in rotating a bitmap from a camera according to the exif value, I have now opted for another option, the BitMapExtended Library from
XverhelstX which does this nicely and easiliy together with the jpegUtils Library. The code looks like this and can be adapted to any other orientation if needed. And yes, I will update

[CODE lang="b4x" title="rotate bitmap according to camera metadata"] Dim TargetWidth,TargetHeight As Int
Dim Exif As ExifData
Dim Orientation As String
Exif.Initialize(File.DirInternal, "Chess.jpg")
Orientation = Exif.getAttribute("Orientation")
Log("Exif Orientation: "&Orientation)
If Orientation = "0" Then
srcBitmap.InitializeResize(File.DirInternal,"Chess.jpg",TargetWidth,TargetHeight,False) 'load and adjusts the Bitmap to the format of the camera
End If
' the Sony Xperia cam leaves a picture that is 90 degrees rotated when the bitmap is loaded and displayed
'requires the BitMapExtended Library
If Orientation = "6" Then
Dim bmp As Bitmap
Dim bmp2 As Bitmap
bmp.InitializeMutable(TargetWidth,TargetWidth) 'must be a square to rotate it by 90 or 270 degrees!
bmp.Initialize(File.DirInternal, "Chess.jpg")
bmp = btmpex.rotateBitmap(bmp,90)
bmp2 = btmpex.createScaledBitmap(bmp,TargetWidth,TargetHeight,False) 'now get it back into the original size
srcBitmap = bmp2
End If
Log("File loaded")
[/CODE]