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

Reduce stderr noise in PIL and rasterio sources #1397

Merged
merged 1 commit into from
Dec 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.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