cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.23k stars 211 forks source link

Resolution of output images not same as the resolution as configured for Device Config #1353

Closed emuguy1 closed 1 month ago

emuguy1 commented 3 months ago

Description I have multiple Device Configs to screenshot my app. I also want to use the Screenshots for the PlayStore Listing. But the Output ed snapshots are not the resolution as configured for the DeviceConfig.

enum class TestDevices(val config: DeviceConfig) {
    Phone(PIXEL_5.copy(screenHeight = 2244, screenWidth = 1008, xdpi = 504, ydpi = 1122)),
    PhoneMaxFontScale(PIXEL_5.copy(screenHeight = 2244, screenWidth = 1008, xdpi = 504, ydpi = 1122, fontScale = 2f)),
    SevenInch(PIXEL_5.copy(screenHeight = 2560, screenWidth = 1800, xdpi = 600, ydpi = 854)),
    SevenInchMaxFontScale(PIXEL_5.copy(screenHeight = 2560, screenWidth = 1800, xdpi = 600, ydpi = 854, fontScale = 2f)),
    TenInch(PIXEL_5.copy(screenHeight = 2560, screenWidth = 1800, xdpi = 900, ydpi = 1280)),
    TenInchMaxFontScale(PIXEL_5.copy(screenHeight = 2560, screenWidth = 1800, xdpi = 900, ydpi = 1280, fontScale = 2f))
  }

For example for the Phone Screenshots the resolution is 499px x 1000 px For the sevenInch & tenInch devices the Screenshot resolution is: 703px x 1000px

Steps to Reproduce Create any Paparaztzi View Snapshot. Go to image Check Resolution of images

Expected behavior Snapshots should have the same resolution as configured in screenHeight and ScreenWidth of Device Config If this is for saving storage at least give us option to disable that, as I am currently not that worried about storage issues

Additional information:

Screenshots If applicable, add screenshots to help explain your problem.

emuguy1 commented 3 months ago

I just saw that this is duplicate of #482 && #953 && #699 ... and there are already multiple PRs I now found that already kind of deal with this but nothing happens. I leaf this open to maybe show the importance of removing the limitation of the screenshot resolution/ making it possible to configure it using the device Config. This seems to be a feature the community really is looking forward to and there are already solutions to do it. So please merge/ integrate it so we can finally use the full potential of Paparazzi to also user the snapshots for things like PlayStore Images

emuguy1 commented 1 month ago

Should be fixed after new release by the merged PR #1382