[Wish] CreateScaledBitmap = core function

Djembefola

Active Member
Licensed User
Longtime User
I very often need the following function in my classes:

B4X:
Sub CreateScaledBitmap(Original As Bitmap, Width As Int, Height As Int) As Bitmap
    Dim r As Reflector
    Dim b As Bitmap
   Dim filter As Boolean: filter=True
   
    b = r.RunStaticMethod("android.graphics.Bitmap", "createScaledBitmap", _
        Array As Object(Original, Width, Height, filter), _
        Array As String("android.graphics.Bitmap", "java.lang.int", "java.lang.int", "java.lang.boolean"))
    Return b
   
End Sub

I would be happy if CreateScaledBitmap could be included in core.jar in a future b4a version.
 

Djembefola

Active Member
Licensed User
Longtime User
Did you have a look at the BitmapExtended library ?

Best regards.

Thanks Klaus, i have never seen this one , but i know, there are several other libraries (like BitmapPlus by Informatix), which provide this functionality.

Nevertheless i would prefer to use this very important function in my classes without referencing another library in each project.
 
Top