Dear All
How to implement SignatureTemplate.Bitmap.Resize.
i want to resize sign bitmap to 250pixel to 156 pixel,
i had try using this code
but image that i save still biggers than this resolution.
(i want to reduce size of file bitmap to 2-5KB)
this my full code
How to implement SignatureTemplate.Bitmap.Resize.
i want to resize sign bitmap to 250pixel to 156 pixel,
i had try using this code
bitmap:
SignatureTemplate.Bitmap.Resize(250,156,True )
but image that i save still biggers than this resolution.
(i want to reduce size of file bitmap to 2-5KB)
this my full code
full:
Dialog.ButtonsFont = XUI.CreateFontAwesome(20)
SignatureTemplate.AddDateAndTime=False
SignatureTemplate.StrokeWidth =2
SignatureTemplate.BackgroundColor=Colors.Transparent
Dim rs As ResumableSub = Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C), "", Chr(0xF00D))
Dialog.GetButton(XUI.DialogResponse_Positive).TextColor = XUI.Color_Green
Dialog.GetButton(XUI.DialogResponse_Cancel).TextColor = XUI.Color_Red
Dialog.ButtonsFont = XUI.CreateDefaultBoldFont(15) 'return it to the default font. It will no longer affect the current dialog
Wait For (rs) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
ImageView1.SetBitmap(SignatureTemplate.Bitmap.Resize(ImageView1.Width, ImageView1.Height, True))
Dim strtmp As String =XUI.DefaultFolder
Dim strtmpf As String ="sign=202310.png"
Dim out As OutputStream = File.OpenOutput(strtmp,strtmpf , False)
SignatureTemplate.Bitmap.Resize(125,60,True )
SignatureTemplate.Bitmap.WriteToStream(out, 80, "PNG")
out.Close
wait for (UploadSignSales(strtmp,strtmpf)) complete (rslt As String)
End If