Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter jpeg priority with the PIL source #1191

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
10 changes: 7 additions & 3 deletions sources/pil/large_image_source_pil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down