A Python wrapper for libjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
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
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
Release history Release notifications | RSS feed
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
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c34982447d416d38ff797d8e60f000488019581871b9c05906c7592645e5a8e |
|
MD5 | 7079597b212fe464d9abb2b8ac163b1a |
|
BLAKE2b-256 | 2df41babd8f052f2aed0c9ed26502c83fed9e9f0341fdb9705a539b2fc4b2cb2 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f43e033f88e642818c211257c02bad998a7bc86fd48fd42b22a2f5fdcbcd2ee8 |
|
MD5 | 4529f9b88af35a86588b6be648053836 |
|
BLAKE2b-256 | f82d335278d78bf7b027324ccef0fe2873aaad98d2ea5575dc238a73c7ac5100 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 251fd0ac810f8e1fd371f813e6efd2779ee21ab1fd95132ed801f72e08371a65 |
|
MD5 | 6285b41500d21fe9e3e7ab61efdfa76b |
|
BLAKE2b-256 | 95160c1d13bbd257a3d3bdfad4233675609a1f6b514532e8705ce24fc894b70c |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937dd7b010a038f64875a3f60ee571ec316d39630d9bf45d21cfb0539ce4cf4a |
|
MD5 | 957d342f4ee4181c4998d473363f8991 |
|
BLAKE2b-256 | 32ab50dd71c130934ee9c203f06ebc8585624f0f4add2c4ee6dafd33d073949b |
Close
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 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a5f3133b3222afc7db9fe1a692f6e10ae07cb30f52639837d51873144109dc1 |
|
MD5 | 5d41ecd0821ee1889388ed6ebb7a69aa |
|
BLAKE2b-256 | d1e0095e49690a79d7b809a01ba8d4f1b66535012bb3fadca6ca158c53154016 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5dd8fe673015508808229e9358f68fff7f2f9f2acc69d42ea4d824a2d22bde |
|
MD5 | b9671d401a4722107c2cda4726a87eed |
|
BLAKE2b-256 | 6d0e0d8903019b733e749081dc37c1dc8684e748a3ff2dea3b6e60579e89ed08 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b01d89f2b65e6b3a5b296c1d9440dfd9c3b5aa3f1ed0b39db35fdcf53dc5b7c3 |
|
MD5 | 13b65a80d8ee7a766033bd6af0f7c7ca |
|
BLAKE2b-256 | f4b5839552bd3cb57f0cab8db55da45ff867889c35bead292cda8dfebe4be4a4 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 203be389e91b99daf1af2467086be550838b91be3eee1b06b196ddc2b40dd5e7 |
|
MD5 | f94c2400ec370220b4a52312518ee29f |
|
BLAKE2b-256 | 813f7c2dce9863a2354856bff132d6dcdd2016e1c2481f1e726d8988a2896a7e |
Close
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 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae40b43a3fd55f57ca337de8858c9a6409aa90e76ac1d0c8b095619b913be4c |
|
MD5 | 93925cf1750a121c2d7b927171d53ef8 |
|
BLAKE2b-256 | b68b3154872b51b9c2b3cb80c209a9b1caf52de452f3c7197ccdd71b6c15b8af |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 306120e99cf662d6eabeb180cff3f07f514eec6cb1fa8128259e84aa1b34f47c |
|
MD5 | e3d7da8dc2cb3c76a48f252cd9576435 |
|
BLAKE2b-256 | 0d04822142eb81806dced37957105e94a1abc6f2203f5c128018a2cff7f8ba65 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 098f698074db7bf3cd3e16a73f274d696b498f42067dd40e3219346efc0efbed |
|
MD5 | 82993539cbce5fe0b5de4fa688565cf7 |
|
BLAKE2b-256 | 41d728cf3e13e61956c3db58edfd7d3dc0180434785814da1be6048de442c4d7 |
Close
Hashes for pylibjpeg_libjpeg-1.1.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9bafd2303472c5c37c861e0f2772cc412450be9a6ce29876a114d7b1fc0e546 |
|
MD5 | 8cb3c48db4d82c235820cd665b66a4e0 |
|
BLAKE2b-256 | ca92d618588b9f5b24f2865a747c82e9d7a9075dce70baaeef67b0d47477e75f |
Close
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 |