'Alfa 0..255
Sub AlfaCorrect(BmpOriginal As Bitmap, AlfaValue As Int) As Bitmap
Dim Bmp2 As Bitmap
Dim Can As Canvas
Dim Color As Long
Bmp2.InitializeMutable(BmpOriginal.Width,BmpOriginal.Height)
Can.Initialize2(Bmp2)
AlfaValue=Bit.And(0xFF,AlfaValue)
For y=0 To BmpOriginal.Height-1
For X=0 To BmpOriginal.Width-1
Color=Bit.Or(Bit.And(0xffffff,BmpOriginal.GetPixel(X,y)) ,Bit.ShiftLeft(AlfaValue,24))
Can.DrawPoint(X,y,Color)
Next
Next
Return Can.Bitmap
End Sub