Android Question Image rotate stops process using RSImageprocessing libs

Tony Caschera

New Member
Licensed User
Longtime User
Hi all, I'm a b4a newb so please bare with me. I'm trying to access a photo stored on my ext. sd card then simply rotate it in an imageviewer. Here is my code:

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim IMG1 As Bitmap
    Dim IMGPROC As RSImageEffects
   
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Dim rot_button As Button
    Dim ImageView1 As ImageView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("caschy_imgprv")
    IMG1 = LoadBitmap(Main.img_dir,Main.img_fn)
    ImageView1.Gravity = Gravity.NO_GRAVITY
    ImageView1.Bitmap = LoadBitmapSample(Main.img_dir,Main.img_fn,640,480)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
    If KeyCode = KeyCodes.KEYCODE_BACK Then
    Activity.Finish
    Activity.RemoveViewAt(1)
    StartActivity(Main)
    End If
End Sub

Sub rot_button_Click
    ImageView1.Bitmap = IMGPROC.rotate(IMG1,90)
   
End Sub

The photo loads up fine in the imageviewer however when I click to rotate, I just get a "unfortunately, the process b4a example has stopped" My device is a Galaxy S3. Can anyone help?
 
Top