[med-svn] [Git][med-team/openslide-python][master] 6 commits: routine-update: New upstream version
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Mon Nov 6 20:45:08 GMT 2023
Étienne Mollier pushed to branch master at Debian Med / openslide-python
Commits:
b5f2c64e by Étienne Mollier at 2023-11-06T21:32:18+01:00
routine-update: New upstream version
- - - - -
0a015e85 by Étienne Mollier at 2023-11-06T21:32:19+01:00
New upstream version 1.3.1
- - - - -
e0583aa2 by Étienne Mollier at 2023-11-06T21:32:19+01:00
Update upstream source from tag 'upstream/1.3.1'
Update to upstream version '1.3.1'
with Debian dir 56f48074315e53b23a8a771e973a17c9a9688ac8
- - - - -
a129e031 by Étienne Mollier at 2023-11-06T21:32:25+01:00
routine-update: Build-Depends: s/dh-python/dh-sequence-python3/
- - - - -
ddc59a3c by Étienne Mollier at 2023-11-06T21:42:15+01:00
d/rules: protect egg-info directory.
This fixes a failure to double build the source code.
- - - - -
2cc79a65 by Étienne Mollier at 2023-11-06T21:43:59+01:00
ready to upload to unstable.
- - - - -
13 changed files:
- CHANGELOG.md
- PKG-INFO
- debian/changelog
- debian/control
- debian/rules
- doc/index.rst
- examples/deepzoom/deepzoom_multiserver.py
- examples/deepzoom/deepzoom_server.py
- examples/deepzoom/deepzoom_tile.py
- openslide/_version.py
- openslide_python.egg-info/PKG-INFO
- pytest.ini
- setup.py
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -1,5 +1,11 @@
# Notable Changes in OpenSlide Python
+## Version 1.3.1, 2023-10-08
+
+* docs: Document using ICC profile's default intent, not absolute colorimetric
+* examples: Default to ICC profile's default intent, not absolute colorimetric
+* tests: Correctly require pytest ≥ 7.0
+
## Version 1.3.0, 2023-07-22
* Support new soname in OpenSlide ≥ 4.0.0
=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: openslide-python
-Version: 1.3.0
+Version: 1.3.1
Summary: Python interface to OpenSlide
Home-page: https://openslide.org/
Maintainer: OpenSlide project
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+openslide-python (1.3.1-1) unstable; urgency=medium
+
+ * New upstream version
+ * Build-Depends: s/dh-python/dh-sequence-python3/ (routine-update)
+ * d/rules: protect egg-info directory.
+ This fixes a failure to double build the source code.
+
+ -- Étienne Mollier <emollier at debian.org> Mon, 06 Nov 2023 21:43:33 +0100
+
openslide-python (1.3.0-1) unstable; urgency=medium
* New upstream version
=====================================
debian/control
=====================================
@@ -6,7 +6,7 @@ Section: python
Testsuite: autopkgtest-pkg-python
Priority: optional
Build-Depends: debhelper-compat (= 13),
- dh-python,
+ dh-sequence-python3,
python3-all-dev,
python3-pil,
python3-pytest,
=====================================
debian/rules
=====================================
@@ -5,7 +5,16 @@ export PYBUILD_NAME=openslide
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
- dh $@ --with python3 --buildsystem=pybuild
+ dh $@ --buildsystem=pybuild
+
+execute_before_dh_auto_build:
+ cp -a openslide_python.egg-info openslide_python.egg-info.orig
+
+execute_before_dh_clean:
+ if [ -d openslide_python.egg-info.orig ] \
+ ; then rm -r openslide_python.egg-info \
+ && mv openslide_python.egg-info.orig openslide_python.egg-info \
+ ; fi
override_dh_installexamples:
dh_installexamples -ppython-openslide-examples -Xjquery.js examples/*
=====================================
doc/index.rst
=====================================
@@ -213,22 +213,21 @@ To include the profile in an image file when saving the image to disk::
image.save(filename, icc_profile=image.info.get('icc_profile'))
To perform color conversions using the profile, import it into
-:mod:`ImageCms <PIL.ImageCms>`. For example, to convert an image in-place
-to a synthesized sRGB profile, using absolute colorimetric rendering::
+:mod:`ImageCms <PIL.ImageCms>`. For example, to synthesize an sRGB profile
+and use it to transform an image for display, with the default rendering
+intent of the image's profile::
from io import BytesIO
from PIL import ImageCms
fromProfile = ImageCms.getOpenProfile(BytesIO(image.info['icc_profile']))
toProfile = ImageCms.createProfile('sRGB')
+ intent = ImageCms.getDefaultIntent(fromProfile)
ImageCms.profileToProfile(
- image, fromProfile, toProfile,
- ImageCms.Intent.ABSOLUTE_COLORIMETRIC, 'RGBA', True, 0
+ image, fromProfile, toProfile, intent, 'RGBA', True, 0
)
-Absolute colorimetric rendering `maximizes the comparability`_ of images
-produced by different scanners. When converting Deep Zoom tiles, use
-``'RGB'`` instead of ``'RGBA'``.
+When converting Deep Zoom tiles, use ``'RGB'`` instead of ``'RGBA'``.
All pyramid regions in a slide have the same profile, but each associated
image can have its own profile. As a convenience, the former is also
@@ -238,15 +237,13 @@ by building an :class:`~PIL.ImageCms.ImageCmsTransform` for the slide and
reusing it for multiple slide regions::
toProfile = ImageCms.createProfile('sRGB')
+ intent = ImageCms.getDefaultIntent(slide.color_profile)
transform = ImageCms.buildTransform(
- slide.color_profile, toProfile, 'RGBA', 'RGBA',
- ImageCms.Intent.ABSOLUTE_COLORIMETRIC, 0
+ slide.color_profile, toProfile, 'RGBA', 'RGBA', intent, 0
)
# for each region image:
ImageCms.applyTransform(image, transform, True)
-.. _maximizes the comparability: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4478790/
-
Caching
-------
=====================================
examples/deepzoom/deepzoom_multiserver.py
=====================================
@@ -73,7 +73,7 @@ def create_app(config=None, config_file=None):
DEEPZOOM_OVERLAP=1,
DEEPZOOM_LIMIT_BOUNDS=True,
DEEPZOOM_TILE_QUALITY=75,
- DEEPZOOM_COLOR_MODE='absolute-colorimetric',
+ DEEPZOOM_COLOR_MODE='default',
)
app.config.from_envvar('DEEPZOOM_MULTISERVER_SETTINGS', silent=True)
if config_file is not None:
@@ -212,6 +212,8 @@ class _SlideCache:
elif mode == 'embed':
# embed ICC profile in tiles
return lambda img: None
+ elif mode == 'default':
+ intent = ImageCms.getDefaultIntent(image.color_profile)
elif mode == 'absolute-colorimetric':
intent = ImageCms.Intent.ABSOLUTE_COLORIMETRIC
elif mode == 'relative-colorimetric':
@@ -276,6 +278,7 @@ if __name__ == '__main__':
'--color-mode',
dest='DEEPZOOM_COLOR_MODE',
choices=[
+ 'default',
'absolute-colorimetric',
'perceptual',
'relative-colorimetric',
@@ -283,11 +286,11 @@ if __name__ == '__main__':
'embed',
'ignore',
],
- default='absolute-colorimetric',
+ default='default',
help=(
- 'convert tiles to sRGB using specified rendering intent, or '
- 'embed original ICC profile, or ignore ICC profile (compat) '
- '[absolute-colorimetric]'
+ 'convert tiles to sRGB using default rendering intent of ICC '
+ 'profile, or specified rendering intent; or embed original '
+ 'ICC profile; or ignore ICC profile (compat) [default]'
),
)
parser.add_argument(
=====================================
examples/deepzoom/deepzoom_server.py
=====================================
@@ -73,7 +73,7 @@ def create_app(config=None, config_file=None):
DEEPZOOM_OVERLAP=1,
DEEPZOOM_LIMIT_BOUNDS=True,
DEEPZOOM_TILE_QUALITY=75,
- DEEPZOOM_COLOR_MODE='absolute-colorimetric',
+ DEEPZOOM_COLOR_MODE='default',
)
app.config.from_envvar('DEEPZOOM_TILER_SETTINGS', silent=True)
if config_file is not None:
@@ -182,6 +182,8 @@ def get_transform(image, mode):
elif mode == 'embed':
# embed ICC profile in tiles
return lambda img: None
+ elif mode == 'default':
+ intent = ImageCms.getDefaultIntent(image.color_profile)
elif mode == 'absolute-colorimetric':
intent = ImageCms.Intent.ABSOLUTE_COLORIMETRIC
elif mode == 'relative-colorimetric':
@@ -224,6 +226,7 @@ if __name__ == '__main__':
'--color-mode',
dest='DEEPZOOM_COLOR_MODE',
choices=[
+ 'default',
'absolute-colorimetric',
'perceptual',
'relative-colorimetric',
@@ -231,11 +234,11 @@ if __name__ == '__main__':
'embed',
'ignore',
],
- default='absolute-colorimetric',
+ default='default',
help=(
- 'convert tiles to sRGB using specified rendering intent, or '
- 'embed original ICC profile, or ignore ICC profile (compat) '
- '[absolute-colorimetric]'
+ 'convert tiles to sRGB using default rendering intent of ICC '
+ 'profile, or specified rendering intent; or embed original '
+ 'ICC profile; or ignore ICC profile (compat) [default]'
),
)
parser.add_argument(
=====================================
examples/deepzoom/deepzoom_tile.py
=====================================
@@ -125,6 +125,8 @@ class TileWorker(Process):
elif mode == 'embed':
# embed ICC profile in tiles
return lambda img: None
+ elif mode == 'default':
+ intent = ImageCms.getDefaultIntent(image.color_profile)
elif mode == 'absolute-colorimetric':
intent = ImageCms.Intent.ABSOLUTE_COLORIMETRIC
elif mode == 'relative-colorimetric':
@@ -356,6 +358,7 @@ if __name__ == '__main__':
'--color-mode',
dest='color_mode',
choices=[
+ 'default',
'absolute-colorimetric',
'perceptual',
'relative-colorimetric',
@@ -363,11 +366,11 @@ if __name__ == '__main__':
'embed',
'ignore',
],
- default='absolute-colorimetric',
+ default='default',
help=(
- 'convert tiles to sRGB using specified rendering intent, or '
- 'embed original ICC profile, or ignore ICC profile (compat) '
- '[absolute-colorimetric]'
+ 'convert tiles to sRGB using default rendering intent of ICC '
+ 'profile, or specified rendering intent; or embed original '
+ 'ICC profile; or ignore ICC profile (compat) [default]'
),
)
parser.add_argument(
=====================================
openslide/_version.py
=====================================
@@ -22,4 +22,4 @@
This module is an implementation detail. The package version should be
obtained from openslide.__version__."""
-__version__ = '1.3.0'
+__version__ = '1.3.1'
=====================================
openslide_python.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: openslide-python
-Version: 1.3.0
+Version: 1.3.1
Summary: Python interface to OpenSlide
Home-page: https://openslide.org/
Maintainer: OpenSlide project
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
=====================================
pytest.ini
=====================================
@@ -1,5 +1,5 @@
[pytest]
-minversion = 6.0
+minversion = 7.0
# don't try to import openslide from the source directory, since it doesn't
# have the compiled extension module
addopts = --import-mode importlib
=====================================
setup.py
=====================================
@@ -43,6 +43,7 @@ setup(
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Bio-Informatics',
],
python_requires='>=3.8',
View it on GitLab: https://salsa.debian.org/med-team/openslide-python/-/compare/1af7cfbf60a28833be2ae26782b6fdc70447775d...2cc79a6568103ea30033480909948ec46424f61a
--
View it on GitLab: https://salsa.debian.org/med-team/openslide-python/-/compare/1af7cfbf60a28833be2ae26782b6fdc70447775d...2cc79a6568103ea30033480909948ec46424f61a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231106/4601b109/attachment-0001.htm>
More information about the debian-med-commit
mailing list