I want to display on my watchface an image retrieved by my mobile from an api. The size is fixed. For that I use ion and I downscale the image so it fits on the watchface. Then, I send it to the watch using the DataApi
.
The problem is that the image is not smooth at all and the edges look pixelised : image.
I've tried those solutions but none of it made a difference :
On the mobile side : resizing the bitmap with ion :
Ion.with(context).load(url).withBitmap().resize(80, 80).centerInside().asBitmap().setCallback(bitmapFutureCallback);
or with Bitmap in bitmapFutureCallback (above):
float side = result.getHeight() > result.getWidth() ? result.getHeight() : result.getWidth();
float scale = 80f / side;
receivingLogo = Bitmap.createScaledBitmap(result,
(int) (result.getWidth() * scale),
(int) (result.getHeight() * scale),
true);
- On the wear side : setting
AntiAlias
andFilterBitmap
to true on the bitmap paint.
What can I use to smooth the bitmap ?
The image before/after : image