Skip to content

Commit

Permalink
Merge pull request #1191 from girder/pil-source-priority
Browse files Browse the repository at this point in the history
Alter jpeg priority with the PIL source
  • Loading branch information
manthey authored Jun 5, 2023
2 parents 76cefe7 + edecebb commit 736a82d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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

0 comments on commit 736a82d

Please sign in to comment.