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

pylibjpeg_libjpeg-1.1.0-cp38-cp38-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

pylibjpeg_libjpeg-1.1.0-cp38-cp38-win32.whl (1.7 MB view details)

Uploaded CPython 3.8 Windows x86

pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pylibjpeg_libjpeg-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win32.whl (1.7 MB view details)

Uploaded CPython 3.7m Windows x86

pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl (4.2 MB view details)

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

pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pylibjpeg_libjpeg-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win32.whl (1.7 MB view details)

Uploaded CPython 3.6m Windows x86

pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl (4.2 MB view details)

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

pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

pylibjpeg_libjpeg-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1c34982447d416d38ff797d8e60f000488019581871b9c05906c7592645e5a8e
MD5 7079597b212fe464d9abb2b8ac163b1a
BLAKE2b-256 2df41babd8f052f2aed0c9ed26502c83fed9e9f0341fdb9705a539b2fc4b2cb2

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f43e033f88e642818c211257c02bad998a7bc86fd48fd42b22a2f5fdcbcd2ee8
MD5 4529f9b88af35a86588b6be648053836
BLAKE2b-256 f82d335278d78bf7b027324ccef0fe2873aaad98d2ea5575dc238a73c7ac5100

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 251fd0ac810f8e1fd371f813e6efd2779ee21ab1fd95132ed801f72e08371a65
MD5 6285b41500d21fe9e3e7ab61efdfa76b
BLAKE2b-256 95160c1d13bbd257a3d3bdfad4233675609a1f6b514532e8705ce24fc894b70c

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_i686.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_i686.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 937dd7b010a038f64875a3f60ee571ec316d39630d9bf45d21cfb0539ce4cf4a
MD5 957d342f4ee4181c4998d473363f8991
BLAKE2b-256 32ab50dd71c130934ee9c203f06ebc8585624f0f4add2c4ee6dafd33d073949b

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eda3aa29947b28d386bdb4d2ddd5182d14742a8f59d534e39adbb670f203f6e6
MD5 e66f257552212ab82c9c03240c27548e
BLAKE2b-256 e6090f9cd89dae4f09763071b66db2871800f2dbc62b323b5af43f936ee9364b

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6a5f3133b3222afc7db9fe1a692f6e10ae07cb30f52639837d51873144109dc1
MD5 5d41ecd0821ee1889388ed6ebb7a69aa
BLAKE2b-256 d1e0095e49690a79d7b809a01ba8d4f1b66535012bb3fadca6ca158c53154016

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 4e5dd8fe673015508808229e9358f68fff7f2f9f2acc69d42ea4d824a2d22bde
MD5 b9671d401a4722107c2cda4726a87eed
BLAKE2b-256 6d0e0d8903019b733e749081dc37c1dc8684e748a3ff2dea3b6e60579e89ed08

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b01d89f2b65e6b3a5b296c1d9440dfd9c3b5aa3f1ed0b39db35fdcf53dc5b7c3
MD5 13b65a80d8ee7a766033bd6af0f7c7ca
BLAKE2b-256 f4b5839552bd3cb57f0cab8db55da45ff867889c35bead292cda8dfebe4be4a4

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_i686.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_i686.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 203be389e91b99daf1af2467086be550838b91be3eee1b06b196ddc2b40dd5e7
MD5 f94c2400ec370220b4a52312518ee29f
BLAKE2b-256 813f7c2dce9863a2354856bff132d6dcdd2016e1c2481f1e726d8988a2896a7e

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6cc328c19b25f632a909df2007493166e246166e6717baaf1a3a7f4f9f89dcd8
MD5 99e1e18e957aa40f5746313a60feb2b4
BLAKE2b-256 ce78fe0cbddfa76a3dd9643f636340db7d45a4b85312e3eef1314a698665532b

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0ae40b43a3fd55f57ca337de8858c9a6409aa90e76ac1d0c8b095619b913be4c
MD5 93925cf1750a121c2d7b927171d53ef8
BLAKE2b-256 b68b3154872b51b9c2b3cb80c209a9b1caf52de452f3c7197ccdd71b6c15b8af

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 306120e99cf662d6eabeb180cff3f07f514eec6cb1fa8128259e84aa1b34f47c
MD5 e3d7da8dc2cb3c76a48f252cd9576435
BLAKE2b-256 0d04822142eb81806dced37957105e94a1abc6f2203f5c128018a2cff7f8ba65

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 098f698074db7bf3cd3e16a73f274d696b498f42067dd40e3219346efc0efbed
MD5 82993539cbce5fe0b5de4fa688565cf7
BLAKE2b-256 41d728cf3e13e61956c3db58edfd7d3dc0180434785814da1be6048de442c4d7

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_i686.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_i686.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 d9bafd2303472c5c37c861e0f2772cc412450be9a6ce29876a114d7b1fc0e546
MD5 8cb3c48db4d82c235820cd665b66a4e0
BLAKE2b-256 ca92d618588b9f5b24f2865a747c82e9d7a9075dce70baaeef67b0d47477e75f

See more details on using hashes here.

File details

Details for the file pylibjpeg_libjpeg-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pylibjpeg_libjpeg-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cdd32af2e8609a5a8fba43206877e84c402e0277e0e63eb8778ccd2aaf440113
MD5 e5140f12ac4ef7e3d609bb57d46eb061
BLAKE2b-256 da2cd4a73872d3cb3064e895dd3357c875dba999726c969d49fee444fe55a9bf

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