Two bitmaps merger from this project https://github.com/sharish/BitmapMerger
BitmapMerger
Author: SMM
Version: 0.01
Sample
BitmapMerger
Author: SMM
Version: 0.01
- BitmapMerger
Events:- merged (mergedBitmap as Bitmap As )
- Initialize (EventName As String)
- Merge (baseBitmap As Bitmap, mergeBitmap As Bitmap, angle As Int, scale As Float, leftOffset As Int, topOffset As Int)
Sample
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim immerger As BitmapMerger
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 imv1 , imv2 , imv3 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("Layout1")
imv1.Initialize("")
imv2.Initialize("")
imv3.Initialize("")
Activity.AddView(imv1,0,0,100%x,30%y)
Activity.AddView(imv2,0,30%y,100%x,30%y)
Activity.AddView(imv3,0,60%y,100%x,30%y)
imv1.Bitmap=LoadBitmap(File.DirAssets,"ba.png")
imv2.Bitmap=LoadBitmap(File.DirAssets,"like.png")
immerger.Initialize("mer")
immerger.Merge(imv1.Bitmap,imv2.Bitmap,120,0.1, 40,20)
End Sub
Sub mer_merged(merged As Bitmap)
imv3.Bitmap=merged
End Sub