large-image-source-tiff 1.29.0__py3-none-any.whl → 1.29.1__py3-none-any.whl

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.

Potentially problematic release.


This version of large-image-source-tiff might be problematic. Click here for more details.

@@ -803,9 +803,18 @@ class TiledTiffDirectory:
803
803
  # Write JPEG End Of Image marker
804
804
  imageBuffer.write(b'\xff\xd9')
805
805
  return imageBuffer.getvalue()
806
- # Get the whole frame, which is in a JPEG or JPEG 2000 format, and
806
+ # Get the whole frame, which is in a JPEG or JPEG 2000 format
807
+ frame = self._getJpegFrame(tileNum, True)
808
+ # For JP2K, see if we can convert it faster than PIL
809
+ if self._tiffInfo.get('compression') in {33003, 33005}:
810
+ try:
811
+ import openjpeg
812
+
813
+ return openjpeg.decode(frame)
814
+ except Exception:
815
+ pass
807
816
  # convert it to a PIL image
808
- imageBuffer.write(self._getJpegFrame(tileNum, True))
817
+ imageBuffer.write(frame)
809
818
  image = PIL.Image.open(imageBuffer)
810
819
  # Converting the image mode ensures that it gets loaded once and is in
811
820
  # a form we expect. If this isn't done, then PIL can load the image
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: large-image-source-tiff
3
- Version: 1.29.0
3
+ Version: 1.29.1
4
4
  Summary: A TIFF tilesource for large_image.
5
5
  Home-page: https://github.com/girder/large_image
6
6
  Author: Kitware, Inc.
@@ -17,11 +17,13 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Requires-Python: >=3.8
19
19
  License-File: LICENSE
20
- Requires-Dist: large-image >=1.29.0
20
+ Requires-Dist: large-image >=1.29.1
21
21
  Requires-Dist: pylibtiff
22
22
  Requires-Dist: tifftools >=1.2.0
23
+ Provides-Extra: all
24
+ Requires-Dist: pylibjpeg-openjpeg ; extra == 'all'
23
25
  Provides-Extra: girder
24
- Requires-Dist: girder-large-image >=1.29.0 ; extra == 'girder'
26
+ Requires-Dist: girder-large-image >=1.29.1 ; extra == 'girder'
25
27
 
26
28
  A TIFF tilesource for large_image.
27
29
 
@@ -0,0 +1,10 @@
1
+ large_image_source_tiff/__init__.py,sha256=jviPOv6MViHA6Lfq8rm4TNFvnO_9dqho9Lt_xAQLLjQ,35736
2
+ large_image_source_tiff/exceptions.py,sha256=NgdwloaDCtbtUMe2BU2lXEU8IwQSYtaokIwGIFypCps,617
3
+ large_image_source_tiff/girder_source.py,sha256=Dp2e3O4VTANYXZI_eybgzs5BcyuMcw2-MAzCUJ8zzPg,1031
4
+ large_image_source_tiff/tiff_reader.py,sha256=wbc5e5BXDTQ1_N8WsuAoDW2A-sihOmXVi3q9u8nmS74,38939
5
+ large_image_source_tiff-1.29.1.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
+ large_image_source_tiff-1.29.1.dist-info/METADATA,sha256=86LMVv2HFja0IQRNiOFB421JzAbJJvz-_CV6Y9OzGi0,1087
7
+ large_image_source_tiff-1.29.1.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
8
+ large_image_source_tiff-1.29.1.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
+ large_image_source_tiff-1.29.1.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
+ large_image_source_tiff-1.29.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- large_image_source_tiff/__init__.py,sha256=jviPOv6MViHA6Lfq8rm4TNFvnO_9dqho9Lt_xAQLLjQ,35736
2
- large_image_source_tiff/exceptions.py,sha256=NgdwloaDCtbtUMe2BU2lXEU8IwQSYtaokIwGIFypCps,617
3
- large_image_source_tiff/girder_source.py,sha256=Dp2e3O4VTANYXZI_eybgzs5BcyuMcw2-MAzCUJ8zzPg,1031
4
- large_image_source_tiff/tiff_reader.py,sha256=xrutsp0YGeVeURN0Yf53whbYmKghpEzWC6349WhsMR8,38650
5
- large_image_source_tiff-1.29.0.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
6
- large_image_source_tiff-1.29.0.dist-info/METADATA,sha256=1oCmyle6d-PtjCIXvuDeiGE1Z13MWjWwa9VHDDJwrC8,1016
7
- large_image_source_tiff-1.29.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
- large_image_source_tiff-1.29.0.dist-info/entry_points.txt,sha256=iZ43sIcj98SND7nDUC-_4qroBL6apyXN4iSbPXZ8LE4,166
9
- large_image_source_tiff-1.29.0.dist-info/top_level.txt,sha256=QRx_D2oeiOOz_5FlBOAoDPF-E4Q-aFmerUWlaeP14B8,24
10
- large_image_source_tiff-1.29.0.dist-info/RECORD,,