NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Use smoother bitmap downscaling for thumbnails.

Open Isira-Seneviratne opened this issue 2 years ago • 6 comments

What is it?

  • [ ] Bugfix (user facing)
  • [x] Feature (user facing)
  • [ ] Codebase improvement (dev facing)
  • [ ] Meta improvement to the project (dev facing)

Description of the changes in your PR

Before/After Screenshots/Screen Record

Screenshot_20220804-193704.jpg

Fixes the following issue(s)

  • Fixes #

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

Isira-Seneviratne avatar Jul 24 '22 04:07 Isira-Seneviratne

When checking the change in PicassoHelper on my Galaxy Tab A6 (Android 8.1), I found that the result bitmap was mutable while the source was immutable, so I removed the bug fix for the issue mentioned. I'll restore it if needed.

Isira-Seneviratne avatar Jul 24 '22 05:07 Isira-Seneviratne

Could you provide screenshots for comparison? Does the benefits exceed the cost of possibly having bugs or crashes?

Screenshot_20220804-193704.jpg

The documentation mentions that a mutable bitmap is returned if the original was immutable.

Edit: If the source bitmap was not returned, and the source is returned if the new dimensions were the same as the original.

Isira-Seneviratne avatar Aug 04 '22 14:08 Isira-Seneviratne

@gulachev @arielshulman could you test if this PR still works fine, or if it reintroduces #4638? Assuming you still have the same phone.

Stypox avatar Aug 04 '22 14:08 Stypox

@Stypox I added a mutable copy operation if the resulting bitmap was immutable (this only happens if the source bitmap was returned and it was immutable).

@mhmdanas Can you update the labels?

Isira-Seneviratne avatar Aug 05 '22 00:08 Isira-Seneviratne

@gulachev @arielshulman could you test if this PR still works fine, or if it reintroduces #4638? Assuming you still have the same phone.

Hey, brought that phone to my boy... I've tested the apk from CI and it worked great with those specific bitmaps which crashed the phone when it displayed on notification bar.

arielshulman avatar Aug 06 '22 18:08 arielshulman

Something strange happened. Anyway, this is approved and merged in #9479, thanks @Isira-Seneviratne :-)

Stypox avatar Nov 29 '22 15:11 Stypox