mirror of
https://github.com/tuskyapp/Tusky
synced 2025-02-09 18:30:42 +01:00
952f9a8614
Loading the image as a `Drawable` allows using the Drawable API to abstract the drawing. This way, any kind of `Drawable` (including the fallback vector drawable) can be drawn in one pass to the Bitmap, without having to be converted to a `Bitmap` first. Also, `BitmapDrawable` will automatically use [`Paint.FILTER_BITMAP_FLAG`](https://developer.android.com/reference/android/graphics/Paint#FILTER_BITMAP_FLAG) when drawing, ensuring the resized image is high-quality even when using a Bitmap-backed Canvas.