When I flip an image (.png) with transparency, a shading appears in the transparency area. Is it possible to remove it?
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Dim bmp As Bitmap = xui.LoadBitmapResize(File.DirAssets, "image1.png", ImageView1.Width, ImageView1.Height, True)
ImageView1.SetBitmap(bmp)
End Sub
Sub Button1_Click
Dim bmp As B4XBitmap = ImageView1.GetBitmap
Dim bmc As BitmapCreatorEffects
bmc.Initialize
Dim bmc_flip As Bitmap = bmc.FlipHorizontal(bmp)
ImageView2.SetBitmap(bmc_flip)
End Sub
Sub Button1_Click
Dim bmp As B4XBitmap = ImageView1.GetBitmap
Dim bmc As BitmapCreatorEffects
bmc.Initialize
bmc.ScaleDownImages = False
Dim bmc_flip As Bitmap = bmc.FlipHorizontal(bmp)
XUIViewsUtils.SetBitmapAndFill(ImageView2, bmc_flip)
End Sub
Note that for this to work correctly in B4i, you need to load the image with the right size:
B4X:
Sub Button1_Click
Dim bmc As BitmapCreatorEffects
bmc.Initialize
bmc.ScaleDownImages = False
Dim bmp As Bitmap = xui.LoadBitmapResize(File.DirAssets, "image1.png", ImageView1.Width * bmc.ImageScale, ImageView1.Height * bmc.ImageScale, True)
Dim bmc_flip As Bitmap = bmc.FlipHorizontal(bmp)
XUIViewsUtils.SetBitmapAndFill(ImageView2, bmc_flip)
End Sub