Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private Timer1 As Timer
End Sub
Sub Globals
Dim test As Bitmap
Dim RSIIP As RSImageProcessing
Dim RSIFilter As RSImageFilters
Private ImageView1 As ImageView
Private Label1 As Label
Private Panel1 As Panel
Private SeekBar1 As SeekBar
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("Layout1")
Init
RSIIP.Initialize
Activity.AddView(Panel1,0,0,100%x,100%y)
Panel1.AddView(Label1,5%x,20dip,90%x,20dip)
Panel1.AddView(SeekBar1,5%x,60dip,90%x,32dip)
Panel1.AddView(ImageView1,(Activity.Width/2)-50dip,Activity.Height-100dip,100dip,100dip)
test.Initialize(File.DirAssets, "d30.jpg")
ImageView1.Bitmap = test
Timer1.Enabled = True
End Sub
Private Sub Init
Timer1.Initialize("Timer1", 2000) '
Panel1.Initialize("Panel1")
SeekBar1.Initialize("SeekBar1")
SeekBar1.Max = 30000
SeekBar1.Value = 0
Label1.Initialize("Label1")
ImageView1.Initialize("ImageView1")
Label1.TextColor = Colors.White
End Sub
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
Label1.Text = Value
ImageView1.Bitmap = RSIFilter.HueFilter(test,Value)
End Sub
Sub Timer1_Tick
SeekBar1.Value = SeekBar1.Value
End Sub