Android Question Pixelated Image after resizing


Active Member
Licensed User
Hi all,
when I try to upsize a image with Canvas, it gives me a totally pixelated image, instead of interpolating it...

Is there any function or library to turn interpolating on?

Thanks in advance :)

(Sorry for the huge image. It was taken directly from my cellphone)


Active Member
Licensed User
For those who search for this too, here is the answer...
Use the code below:
Sub SetAntiAlias (c3 As Canvas)
   Dim r As Reflector
   Dim NativeCanvas As Object
   r.Target = c3
   NativeCanvas = r.GetField("canvas")
   Dim PaintFlagsDrawFilter As Object
   PaintFlagsDrawFilter = r.CreateObject2("", _
Array As Object(0, 2), Array As String("", ""))

   r.Target = NativeCanvas
   r.RunMethod4("setDrawFilter", Array As Object(PaintFlagsDrawFilter), Array As String(""))
End Sub
In Array As Object(0, 2), the number must be set to 2 for antialiasing Bitmaps.
Other things, such as lines should be working with 1.

For those who are confused: We use this code after initializing the canvas;)

Like so:
'Here you draw all your bitmaps and things...

A huge thanks to @LucaMs :D