From 1ad34478deddcf8e9861b900895dabc44fc41e58 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 15 Jul 2020 08:30:28 +0200 Subject: [PATCH] Increase default jpeg-size to 7680 x 4320 px #388 It's easier to decrease this when you've made a mistake than the other way. Signed-off-by: Michael Mayer --- docker-compose.travis.yml | 5 +++-- docker-compose.yml | 5 +++-- docker/demo/Dockerfile | 1 + docker/photoprism/arm64/docker-compose.yml | 7 +++---- docker/photoprism/docker-compose.yml | 7 +++---- internal/config/flags.go | 4 ++-- internal/thumb/types.go | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index c5c08465b..b8e1ae382 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -38,8 +38,9 @@ services: PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear PHOTOPRISM_THUMB_UNCACHED: "true" # Enable on-demand thumbnail rendering (high memory and cpu usage) PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680) - PHOTOPRISM_THUMB_SIZE_UNCACHED: 4096 # On-demand rendering size limit (default 4096, min 720, max 7680) - PHOTOPRISM_JPEG_SIZE: 4096 # Size limit for converted image files in pixels (720-30000) + # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD + PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) + PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files diff --git a/docker-compose.yml b/docker-compose.yml index 52e70be87..52e111d1b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,8 +52,9 @@ services: PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear PHOTOPRISM_THUMB_UNCACHED: "true" # Enable on-demand thumbnail rendering (high memory and cpu usage) PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680) - PHOTOPRISM_THUMB_SIZE_UNCACHED: 4096 # On-demand rendering size limit (default 4096, min 720, max 7680) - PHOTOPRISM_JPEG_SIZE: 4096 # Size limit for converted image files in pixels (720-30000) + # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD + PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) + PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files diff --git a/docker/demo/Dockerfile b/docker/demo/Dockerfile index e63e2c0ef..eee373e8b 100644 --- a/docker/demo/Dockerfile +++ b/docker/demo/Dockerfile @@ -24,6 +24,7 @@ ENV PHOTOPRISM_THUMB_FILTER lanczos ENV PHOTOPRISM_THUMB_UNCACHED true ENV PHOTOPRISM_THUMB_SIZE 4096 ENV PHOTOPRISM_THUMB_SIZE_UNCACHED 4096 +ENV PHOTOPRISM_JPEG_SIZE 4096 ENV PHOTOPRISM_JPEG_QUALITY 95 ENV PHOTOPRISM_SITE_CAPTION "Try our demo" diff --git a/docker/photoprism/arm64/docker-compose.yml b/docker/photoprism/arm64/docker-compose.yml index e60857b93..1c34e764b 100644 --- a/docker/photoprism/arm64/docker-compose.yml +++ b/docker/photoprism/arm64/docker-compose.yml @@ -42,10 +42,9 @@ services: PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear PHOTOPRISM_THUMB_UNCACHED: "false" # Enable on-demand thumbnail rendering (high memory and cpu usage) PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680) - # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage) - PHOTOPRISM_THUMB_SIZE_UNCACHED: 4096 # On-demand rendering size limit (default 4096, min 720, max 7680) - # PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # Retina 6K, 8K Ultra HD - PHOTOPRISM_JPEG_SIZE: 4096 # Size limit for converted image files in pixels (720-30000) + # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD + PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) + PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) PHOTOPRISM_STORAGE_PATH: "/photoprism/storage" # Storage PATH for generated files like cache and index volumes: diff --git a/docker/photoprism/docker-compose.yml b/docker/photoprism/docker-compose.yml index f0a4195ce..bdb7de8e6 100644 --- a/docker/photoprism/docker-compose.yml +++ b/docker/photoprism/docker-compose.yml @@ -41,10 +41,9 @@ services: PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear PHOTOPRISM_THUMB_UNCACHED: "false" # Enable on-demand thumbnail rendering (high memory and cpu usage) PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680) - # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage) - PHOTOPRISM_THUMB_SIZE_UNCACHED: 4096 # On-demand rendering size limit (default 4096, min 720, max 7680) - # PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # Retina 6K, 8K Ultra HD - PHOTOPRISM_JPEG_SIZE: 4096 # Size limit for converted image files in pixels (720-30000) + # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD + PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) + PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) PHOTOPRISM_STORAGE_PATH: "/photoprism/storage" # Storage PATH for generated files like cache and index volumes: diff --git a/internal/config/flags.go b/internal/config/flags.go index 6d442460b..b33465781 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -286,13 +286,13 @@ var GlobalFlags = []cli.Flag{ cli.IntFlag{ Name: "thumb-size-uncached, x", Usage: "on-demand rendering size limit in `PIXELS` (720-7680)", - Value: 4096, + Value: 7680, EnvVar: "PHOTOPRISM_THUMB_SIZE_UNCACHED", }, cli.IntFlag{ Name: "jpeg-size", Usage: "size limit for converted image files in `PIXELS` (720-30000)", - Value: 4096, + Value: 7680, EnvVar: "PHOTOPRISM_JPEG_SIZE", }, cli.IntFlag{ diff --git a/internal/thumb/types.go b/internal/thumb/types.go index c47e53587..48bf0b84f 100644 --- a/internal/thumb/types.go +++ b/internal/thumb/types.go @@ -4,7 +4,7 @@ import "github.com/disintegration/imaging" var ( Size = 2048 - Limit = 4096 + Limit = 7680 Filter = ResampleLanczos JpegQuality = 95 JpegQualitySmall = 80