Sub imageset_click
chooser.Show("image/*", "Choose image")
End Sub
Sub chooser_Result (Success As Boolean, Dir As String, FileName As String)
seldir=Dir
selfile=FileName
If Success Then
Panel_SELECTIMAGE.Visible=True
Dim bmp As Bitmap
bmp.Initialize(Dir, FileName)
MyImageviewExtras.setBitmap(image_SELECTED,bmp)
MyImageviewExtras.enablePanAndZoom(image_SELECTED)
'image_SELECTED.Bitmap=LoadBitmap(Dir, FileName)
'rc.writeBitmapToFile(bmp, filedefault,
'Activity.SetBackgroundImage(bmp)
Else
ToastMessageShow("No image selected", True)
End If
End Sub
Sub Button_ok_Click
Dim newfile As String
Dim bmap2 As Bitmap
Dim cs As Canvas
'cs.Initialize(image_SELECTED)
'bmap2.InitializeMutable(image_SELECTED.Width,image_SELECTED.Height)
' 'bmap2=image_SELECTED..Bitmap
' Dim path1 As Path
' path1.Initialize(image_SELECTED.left,image_SELECTED.top)
' path1.LineTo(image_SELECTED.left+image_SELECTED.width,image_SELECTED.Top)
' path1.LineTo(image_SELECTED.left+image_SELECTED.width,image_SELECTED.Top+image_SELECTED.Height)
' path1.LineTo(image_SELECTED.left,image_SELECTED.Top+image_SELECTED.Height)
' path1.Initialize(image_SELECTED.left,image_SELECTED.top)
' cs.ClipPath(path1)
'
bmap2.Initialize3(image_SELECTED.Bitmap)
newfile=DateTime.Now & ".jpg"
rc.writeBitmapToFile(bmap2,filedefault,newfile,100)
'File.Copy(seldir,selfile,filedefault,newfile)
map2.Put("filepath",filedefault)
map2.Put("imagefile",newfile)
File.WriteMap(File.DirInternal, "alarmimage.ini", map2)
End Sub
Sub Button_cancel_Click
ToastMessageShow("No image selected", True)
Panel_SELECTIMAGE.Visible=False
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?