numpyimage 3.3.0__tar.gz → 3.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.3.0
3
+ Version: 3.4.0
4
4
  Summary: Load, save, & manipulate image files as numpy arrays
5
5
  Author-email: Jasper Phelps <jasper.s.phelps@gmail.com>
6
6
  License: MIT License
@@ -367,7 +367,8 @@ def show(data,
367
367
  dim_order='yx',
368
368
  data_type: Literal['image', 'segmentation'] = 'image',
369
369
  mode: Literal['PIL', 'mpl'] = 'PIL',
370
- convert_to_8bit=True,
370
+ convert_to_8bit: bool = True,
371
+ convert_kwargs: dict = {'maximize_contrast': True},
371
372
  channel_axis='guess',
372
373
  **kwargs) -> None:
373
374
  """
@@ -411,7 +412,11 @@ def show(data,
411
412
  data = np.moveaxis(data, utils.find_channel_axis(data), -1)
412
413
 
413
414
  if convert_to_8bit and data.dtype != np.uint8:
414
- data = operations.to_8bit(data)
415
+ if any(key in convert_kwargs for key in
416
+ ['bottom_value', 'bottom_percentile', 'top_value', 'top_percentile']):
417
+ if 'maximize_contrast' not in convert_kwargs:
418
+ convert_kwargs['maximize_contrast'] = True
419
+ data = operations.to_8bit(data, **convert_kwargs)
415
420
 
416
421
  colorbar = False
417
422
  if 'colorbar' in kwargs:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numpyimage
3
- Version: 3.3.0
3
+ Version: 3.4.0
4
4
  Summary: Load, save, & manipulate image files as numpy arrays
5
5
  Author-email: Jasper Phelps <jasper.s.phelps@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'
4
4
 
5
5
  [project]
6
6
  name = 'numpyimage'
7
- version = '3.3.0'
7
+ version = '3.4.0'
8
8
  description = 'Load, save, & manipulate image files as numpy arrays'
9
9
  readme.file = 'README.md'
10
10
  readme.content-type = 'text/markdown'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes