Android Question transparent image resizing issues

sorex

Expert
Licensed User
Longtime User
Hello,

What is the best method to give really smooth downscaled transparent images on Android?

I tried the regular core drawbitmap method to a smaller canvas size
(upper right circle in image) but for some reason it looks bad and even worse than a 1:1 copy and then resizing its placeholder (bottom right cirlce in image).

I've attached an image that illustrates it and the smaller it gets the worse.
The right part of the image is the zoomed version of what you see on the left.
 

Attachments

  • resize.png
    resize.png
    17.2 KB · Views: 160
Last edited:

sorex

Expert
Licensed User
Longtime User
if you think that was just nitpicking I'll show you how bad it looks with my object.

resize_bugs.png


right is the bitmap copy one and looks way off.

it seems that the .drawBitmap to different rectangle shape needs an update.

ABextdraw does it fine but I didn't want to use extra libraries so I use a workaround that uses a bit more memory.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Thanks Luca,

Erel's code didn't work but your 2 value as flag does work.

I'll keep that in mind when I allow myself to use libraries ;)

I wonder why it hasn't been added to the core libs already?
As requested in that thread 2 years ago.
 
Upvote 0
Top