Skip to main content

A Python wrapper for libjpeg, with a focus on use as a plugin for for pylibjpeg

Project description

codecov Build Status PyPI version Python versions

pylibjpeg-libjpeg

A Python 3.6+ wrapper for Thomas Richter's libjpeg, with a focus on use as a plugin for pylibjpeg.

Linux, OSX and Windows are all supported.

Installation

Dependencies

NumPy

Installing the current release

pip install pylibjpeg-libjpeg

Installing the development version

Make sure Python and Git are installed. For Windows, you also need to install Microsoft's C++ Build Tools.

git clone --recurse-submodules https://github.com/pydicom/pylibjpeg-libjpeg
python -m pip install pylibjpeg-libjpeg

Supported JPEG Formats

Decoding

ISO/IEC Standard ITU Equivalent JPEG Format
10918 T.81 JPEG
14495 T.87 JPEG-LS
18477 JPEG XT

Encoding

Encoding of JPEG images is not currently supported

Supported Transfer Syntaxes

Decoding

UID Description
1.2.840.10008.1.2.4.50 JPEG Baseline (Process 1)
1.2.840.10008.1.2.4.51 JPEG Extended (Process 2 and 4)
1.2.840.10008.1.2.4.57 JPEG Lossless, Non-Hierarchical (Process 14)
1.2.840.10008.1.2.4.70 JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
1.2.840.10008.1.2.4.80 JPEG-LS Lossless
1.2.840.10008.1.2.4.81 JPEG-LS Lossy (Near-Lossless) Image Compression

Usage

With pylibjpeg and pydicom

from pydicom import dcmread
from pydicom.data import get_testdata_file

import pylibjpeg

ds = dcmread(get_testdata_file('JPEG-LL.dcm'))
arr = ds.pixel_array

Standalone JPEG decoding

You can also decode JPEG images to a numpy ndarray:

from libjpeg import decode

with open('filename.jpg', 'rb') as f:
    # Returns a numpy array
    arr = decode(f.read())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win32.whl (1.7 MB view details)

Uploaded CPython 3.9 Windows x86

pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win32.whl (1.7 MB view details)

Uploaded CPython 3.8 Windows x86

pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win32.whl (1.7 MB view details)

Uploaded CPython 3.7m Windows x86

pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win32.whl (1.7 MB view details)

Uploaded CPython 3.6m Windows x86

pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 216596b26fe7c1a8483ef967b3ec5aea55a286a334e973e05ac22ab1ebdbb9c0
MD5 bf6dcd7d436d78d9b828a9710571d0d4
BLAKE2b-256 3b0c159a68146448a223f945dd1f3c2100156929289f4e54aa58208f4aacfab3

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 626aa744e81dca4e264e029bba1b837c51466e2f70579b2e24bd7c6625b7d576
MD5 eabff9b144ef0b8e0204a366df2bba94
BLAKE2b-256 fb4267b291565947b08fb7baa80c4cfd4806818982287d2bee82904900a3754f

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 85b6c0c4562f5531f98b238c609ed560c1f4835f9d4e338a33aef431321e5969
MD5 dd92de9e4e3f63b509a301cad5dbf74d
BLAKE2b-256 f36fa5be2a148d4a3130ed79ae7e365e964ec80689240a2fcfd6b691b5b5f7bb

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 f0f5b4eb029ce9626b0a6586d98fefcb9fb2ab2d996857498a34cd6bde4af111
MD5 b9d0e5e502f9802d43bc19f1f8b0e47d
BLAKE2b-256 111912359919f81e18fd015526474694588acaa0dd718cdb49e085d080049175

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 243f5629f6c0b5c79d4fc5df53b20a7850394c8bcb61c49d0432521ce2ed9354
MD5 9bdd1edd9bf9ce36ee22d8c38f69f812
BLAKE2b-256 0961fb0248ee5ee6cc8dc7cf27b447cf7551b0e1817789a01b39b8c05120d0fc

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e65f81cebf93da4cd0c3f9cffd23daffa17f3abc10e2271bfa730ee86c528f2a
MD5 1dcd8b28ff8e0bdfb1fab285ffa75a5d
BLAKE2b-256 94924381a806a7dbefe4441e29506c14ee67b700378c88d83cf355fd0cba4c15

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 52a62c13f57a5689df73563f6b2a659d9623aaab67916f5faf310789bb7f3218
MD5 b8f3c9313af7a26c53d360bd5d55782a
BLAKE2b-256 2b7c621262d365db35bd0e5ec1d685165e18cbd3ae61a2c778b545820917bc5e

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3c1fed2fa88ecc101d45409a4cdf973e50e02b923479d2882aa7a85c2710e72c
MD5 52e2a56b0e2a4b207e3d6a422fcd5480
BLAKE2b-256 cdd17469d7d0a2f6627e7f55c62067d41c4050d94f1b3836aa6416c27cb4a37b

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 cffc74121163a9c26df76e41c5e125713576b11d50132dcbffb20ad388307769
MD5 0ddf0338aab302ad058404487949e919
BLAKE2b-256 b54edb6495248f17d5578a96c905eb1b652e239ceb20cf42774588f06e54e9e4

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d7d8044c8f09ba550b26c371eb2e01177b1fbcc19686d2d0dce0c83f7ba23e5f
MD5 44040ae58e1ed103348f69b7474194bd
BLAKE2b-256 4fd7b7eb113680f12dfe45329e490cfb5b82366414a5aece752271f66e16cb57

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1a03e48d65af868701b2c9d623771c9f69911d337f3567a0db356097757498ee
MD5 32bb0ff554fa83203f1b8c96d03b31d9
BLAKE2b-256 378138d8b98e7b2b851725bd2b4aa7af2b216b328e67e1a3a97fbe82687fda0f

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 9dca3c08a4de86f20ca245ca91da916d3178c155408e626708a9fa1fcbfded08
MD5 6d6da188b24605eae1f5aeaa8434b01d
BLAKE2b-256 13858aa766f8853e238ddcb07e212f24e9b70a64277cbf6e363657014fb249dd

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 30edd894659f9b2e3e5007859d2729b533c627c6cdc82ced6de8578062df0701
MD5 3211813df374b1e4ee016c099e7aa932
BLAKE2b-256 71eb7b847871a7e14064f7b463e3accd58cfbac549444b49ba74a520b82bebcb

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 b1e06101126ffd545539032151808e26b3a73afe7ab2149d9d15e2f4b85cf51a
MD5 5c6ca27954fc0679cb8c00851e763547
BLAKE2b-256 fef0ac1c08a352fea2f93dc51ca5b5a8028ac80065ab5fcead9f43d6cb4f9146

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 55d189b188d3305940041348e9a4831a2139f27ddbf93261ce87fecc997b5308
MD5 d15511965ef7be3a79599688336dcb69
BLAKE2b-256 abf4c40c97d55b4383bf6f90ebdc5855f846675092ad36d9772df0552f77d4e7

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 aff1c374bd248a15eac4a33a7cf41594f6ebb034c5ae9942bc7abc1376230d62
MD5 05845bf25cef1f28227c36d7c13ed458
BLAKE2b-256 3dc01ab35d0685a15f135e1986d04bf78a92ade4509d621f28a106c8f292a011

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 eeff8b7b7dbee522a0e13ea2a4d55524fb7da69d5af395b939b51daf9e1b4ffd
MD5 2a2ee4bd8fa7ec25d94819d658c65505
BLAKE2b-256 21d2808c72a4b7862faca344722b755b8b69e76225fcafc78281a94aa3857f3b

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6d6f6257835954b66edc9caaa2b55c11f9f7693207230c1487c467271e398c74
MD5 aad3dc8e40c6c132cabb5a240a528f6c
BLAKE2b-256 eda8d568f37920d149685f3be69fc4146589e749379998bca91292c6eba2e5c9

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 e9bb2a0f60447d165101659aa2b36d65282a8d18367d362dd6d520b7d7f5cacd
MD5 5b5d12edb1beca9dea4c1404b2593be2
BLAKE2b-256 f534dcbbdc8a4e045f1ae2fa740c54a7a6f22fb7143fb5af92ce6da081c0f30d

See more details on using hashes here.

File details

Details for the file pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pymedphys_pylibjpeg_libjpeg-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eac3961b16a923e79be19c71ca728b151e6b001cbcba4a47843d975edc14eada
MD5 8d7bc58bed9eaeba7f9162be38995496
BLAKE2b-256 b124efdef71e0a50f1e771418fd779087d19e458cfd61222513f4cf64ef4b103

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page