REPLAY- 1893: Implement bitmap downscaling#1546
Merged
jonathanmos merged 1 commit intoJul 24, 2023
Merged
Conversation
jonathanmos
force-pushed
the
jmoskovich/replay-1893/image-downscaling
branch
from
July 16, 2023 12:13
26787a1 to
86eb5b5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/base64-jmoskovich #1546 +/- ##
=============================================================
- Coverage 83.61% 83.40% -0.22%
=============================================================
Files 439 439
Lines 14950 14991 +41
Branches 2259 2258 -1
=============================================================
+ Hits 12500 12502 +2
- Misses 1878 1901 +23
- Partials 572 588 +16
🚀 New features to boost your workflow:
|
jonathanmos
marked this pull request as ready for review
July 17, 2023 12:11
jonathanmos
commented
Jul 17, 2023
0xnm
reviewed
Jul 17, 2023
0xnm
left a comment
Member
There was a problem hiding this comment.
I left one comment wondering if we can use only 1 bitmap during the image conversion flow, I guess it should be possible.
mariusc83
reviewed
Jul 18, 2023
mariusc83
reviewed
Jul 18, 2023
jonathanmos
force-pushed
the
jmoskovich/replay-1893/image-downscaling
branch
from
July 18, 2023 13:10
cfb32f5 to
7ca6298
Compare
jonathanmos
force-pushed
the
jmoskovich/replay-1893/image-downscaling
branch
from
July 19, 2023 13:07
0d40dc0 to
99c2142
Compare
0xnm
reviewed
Jul 19, 2023
jonathanmos
force-pushed
the
jmoskovich/replay-1893/image-downscaling
branch
2 times, most recently
from
July 23, 2023 10:55
8fbe3a3 to
8a461d6
Compare
jonathanmos
commented
Jul 24, 2023
0xnm
approved these changes
Jul 24, 2023
jonathanmos
force-pushed
the
jmoskovich/replay-1893/image-downscaling
branch
from
July 24, 2023 13:04
7ab5589 to
5e966bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implement bitmap downscaling similar to what was done on iOS, aiming to end up with a bitmap of 10kb or less. We calculate the expected dimensions sizes for a perfect square with the required filesize, and then work out the dimensions of the resized bitmap from that.
Things to consider:
Some numbers from testing:
Initial bitmap size: 26544
Size of bitmap after downscaling: 9400
After webp compression: 3136
Motivation
This pr will allow us to more accurately size the lrucache
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)