Skip to content

Commit

Permalink
Merge pull request #1397 from girder/reduce-noise
Browse files Browse the repository at this point in the history
Reduce stderr noise in PIL and rasterio sources
  • Loading branch information
manthey authored Dec 5, 2023
2 parents 7845164 + 5cb6169 commit c955723
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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.26.3

### Improvements
- Reduce stderr noise in PIL and rasterio sources ([#1397](../../pull/1397))

### Bug Fixes
- Fix an issue emitting geojson annotations ([#1395](../../pull/1395))
- Fix an issue when tifffile reports no key frame ([#1396](../../pull/1396))
Expand Down
6 changes: 4 additions & 2 deletions sources/pil/large_image_source_pil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ def _fromRawpy(self, largeImagePath):
try:
import rawpy

rgb = rawpy.imread(largeImagePath).postprocess()
rgb = large_image.tilesource.utilities._imageToNumpy(rgb)
rgb = rawpy._rawpy.RawPy(1)
rgb.open_file(largeImagePath)
rgb = rgb.postprocess()
rgb = large_image.tilesource.utilities._imageToNumpy(rgb)[0]
if rgb.shape[2] == 2:
rgb = rgb[:, :, :1]
elif rgb.shape[2] > 3:
Expand Down
1 change: 1 addition & 0 deletions sources/rasterio/large_image_source_rasterio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
pass

warnings.filterwarnings('ignore', category=rio.errors.NotGeoreferencedWarning, module='rasterio')
rio._env.code_map.pop(1, None)


def make_crs(projection):
Expand Down

0 comments on commit c955723

Please sign in to comment.