1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-25 00:01:23 +00:00

Use BitmapCompat.createScaledBitmap().

This commit is contained in:
Isira Seneviratne
2022-07-24 09:11:59 +05:30
committed by Stypox
parent 2984649106
commit b0516fbf1d
3 changed files with 12 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.appcompat.widget.PopupMenu;
import androidx.core.graphics.BitmapCompat;
import androidx.core.graphics.Insets;
import androidx.core.math.MathUtils;
import androidx.core.view.ViewCompat;
@@ -455,10 +456,11 @@ public abstract class VideoPlayerUi extends PlayerUi
}
final float endScreenHeight = calculateMaxEndScreenThumbnailHeight(thumbnail);
final Bitmap endScreenBitmap = Bitmap.createScaledBitmap(
final Bitmap endScreenBitmap = BitmapCompat.createScaledBitmap(
thumbnail,
(int) (thumbnail.getWidth() / (thumbnail.getHeight() / endScreenHeight)),
(int) endScreenHeight,
null,
true);
if (DEBUG) {