From edecebb3c5a50e56e9014541b831416151d44a8d Mon Sep 17 00:00:00 2001 From: David Manthey Date: Mon, 5 Jun 2023 13:34:08 -0400 Subject: [PATCH] Alter jpeg priority with the PIL source --- CHANGELOG.md | 3 +++ sources/pil/large_image_source_pil/__init__.py | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28dc3158d..a4101848d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 1.22.2 +### Changes +- Alter jpeg priority with the PIL source ([#1191](../../pull/1191)) + ### Bug Fixes - Fix NeededInitPrefix namespace errors ([#1190](../../pull/1190)) diff --git a/sources/pil/large_image_source_pil/__init__.py b/sources/pil/large_image_source_pil/__init__.py index 6dc3ac6f1..282204dfd 100644 --- a/sources/pil/large_image_source_pil/__init__.py +++ b/sources/pil/large_image_source_pil/__init__.py @@ -85,13 +85,17 @@ class PILFileTileSource(FileTileSource, metaclass=LruCacheMetaclass): cacheName = 'tilesource' name = 'pil' - # Although PIL is always a fallback source, prefer it to other fallback + # Although PIL is mostly a fallback source, prefer it to other fallback # sources extensions = { - None: SourcePriority.FALLBACK_HIGH + None: SourcePriority.FALLBACK_HIGH, + 'jpg': SourcePriority.LOW, + 'jpeg': SourcePriority.LOW, + 'jpe': SourcePriority.LOW, } mimeTypes = { - None: SourcePriority.FALLBACK_HIGH + None: SourcePriority.FALLBACK_HIGH, + 'image/jpeg': SourcePriority.LOW, } def __init__(self, path, maxSize=None, **kwargs):