getsentry / getsentry/sentry-java

Replay: internal screenshot format

Aperta
#4,154 0 commenti 0 reazioni 1 assegnatario Rivendicata da @romtsn Vedi su GitHub
Android Explore > Replays Improvement Replays
Lingua principale
Kotlin
Stelle
1.4k
Fork
478
Merge medio
2g 23h
PR unite (30g)
67

Descrizione

### Description

I'm switching Flutter to using `onScreenshotRecorded(Bitmap)` and I've noticed a degradation in visual quality. I believe it is because the original code, which used the `File` based API, saved the screenshot to PNG, while the native Bitmap implementation uses JPG.

Previously, with Flutter generated PNG: https://sentry-sdks.sentry.io/replays/2e9baae198384b6387e4e3f497070382/?project=5428562&query=release%3Aoss.krtirtho.spotube.dev%403.9.0-dev%2B38&referrer=%2Freplays%2F%3AreplaySlug%2F&statsPeriod=90d&yAxis=count%28%29&t=0

Image

New, with Android JPG from Bitmap: https://sentry-sdks.sentry.io/replays/0a8ff56225b74dbf93b519043224fe54/?project=5428562&query=release%3Aoss.krtirtho.spotube.dev%403.9.0-dev%2B38&referrer=%2Freplays%2F%3AreplaySlug%2F&statsPeriod=90d&t_main=tags&yAxis=count%28%29&t=2

Image

You can clearly see JPG-specific artifacts in the new version. Interestingly, the new version also results in a video that is larger than previously, at the same resolution, although some of that could be attributed to a slightly different content because the testing app uses random images in button backgrounds.

Have you considered PNG as the screenshot format when saving to file? If not, I'd suggest we evaluate this from the performance perspective, as the quality should be a no-brainer.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.