getsentry / getsentry/sentry-java

Replay: internal screenshot format

Abierto
#4,154 0 comentarios 0 reacciones 1 asignado Reclamado por @romtsn Ver en GitHub
Android Explore > Replays Improvement Replays
Lenguaje dominante
Kotlin
Estrellas
1.4k
Forks
478
Merge medio
2 d 22 h
PR fusionados (30 d)
69

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.