Radiokot / photoprism-android-client

📸 A convenient Android gallery for your PhotoPrism library with plenty of useful features
https://radiokot.com.ua/p/photoprism-android-gallery
GNU General Public License v3.0
391 stars 30 forks source link

Higher resolution photos (not downscaled) never load #71

Closed linosgian closed 1 year ago

linosgian commented 1 year ago

What is wrong? On both my android phones and the Android TV, high resolution photos never load. Sometimes (especially on the Android TV) the app crashes. This is not an issue for the official photoprism PWA app.

An example of such a case is a photo taken with my phone: JPEG 8192x6144, 6.8 MBs

When I enable downscaling, things work fine for some of the photos, others continue to fail loading.

To Reproduce Steps to reproduce the behavior:

  1. Browse any photo that has high resolution.

Expected behavior All photos should -eventually- load (up to a reasonable size/resolution)

Screenshots

Device (please complete the following information):

Radiokot commented 1 year ago

Hi. Thank you for the report, I will check it.

Radiokot commented 1 year ago

Could you please explain how you made PhotoPrism always return the unresized originals?

linosgian commented 1 year ago

Following the official docs here:

To view original images, enable Dynamic Previews, and configure Dynamic Size Limit and Static Size Limit to a small value like 720. When viewing images exceeding that limit, the original files will be displayed.

linosgian commented 1 year ago

Playing around with the settings a little bit, it looks like when photos are downscaled the issue is less likely to happen, but it seems like a general performance issue. For instance, if I swipe through my library too fast, the issue occurs even with downscaling (too many downloads happening at once potentially ?). When the original photo is served, trying to view even one image, the app crashes

Radiokot commented 1 year ago

There was an obvious issue in the code: downscaling was disabled to improve zoom capabilities, but I didn't know it was possible to get a file from PhotoPrism that exceeds the requested preview size. The fix will be included in the next release.

Radiokot commented 1 year ago

The fix is included to the latest release

linosgian commented 1 year ago

I've updated and tested, everything works flawlessly on my phone, thanks!