A Python wrapper for libjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
pylibjpeg-libjpeg
A Python 3.7+ wrapper for Thomas Richter's libjpeg, with a focus on use as a plugin for pylibjpeg.
Linux, MacOS 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
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())
# Or simply...
arr = decode('filename.jpg')
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 Distribution
Built Distributions
Close
Hashes for pymedphys-pylibjpeg-libjpeg-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3616634c1de6c7ac5227afd8f8b3933612c685a4a038e449dd7acb0611c631b4 |
|
MD5 | c9ad17857a4c5ba90ad1d62c3c5d44a2 |
|
BLAKE2b-256 | aa851f4c559ca07bdcce6f806216f2a4cb4f2fd0ce14ee036cd5214f58b47747 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e264805aa29d09aca1e0a217100ca8904bc8cbc40dae2d8796d90fb034862b51 |
|
MD5 | c3b239f03f99e4feb93b7b73390d3a47 |
|
BLAKE2b-256 | 8b428c004fb9e4c40690a0d502483bed20b67f2a158f0cad3cbe9a5187cbdec0 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4db1d7a96a6569b33789faadf0c1a3b9cce0e2b12f93e736b6074e0b33627b9 |
|
MD5 | 62416dc82b40aa49e840ba8ae062284f |
|
BLAKE2b-256 | 00367d2bf1c308f39a42822578c8b9a3d5e693090ceb65b8c5a1176f22e1b70d |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e05b6120e615c278eedfa125aeb72f3377e41c801ec2b3a0650824c5d8a5a389 |
|
MD5 | e7326da30bfc972c2e811fcbc77c221c |
|
BLAKE2b-256 | be2e5ef0aee3a8607dd9fbee2d4641953b6a7535d7dacfde78bf9748e99cd58c |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3328a1e0aebf2cc070bdfdb9debb2dafdf2c7af33f0fc83f6cd08e984a80e18a |
|
MD5 | 0b7618412cbe96dbaf85d37f750466c4 |
|
BLAKE2b-256 | af46ea95989b212b6605990601398953915ba35a86f32cafbf8e6de2d4906a0d |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 275f90167580d8af0717a50c750f754d71b649b1d9eef26ae615d8f35cae5ee7 |
|
MD5 | 8040467c67886b30bbcf7b86d7002800 |
|
BLAKE2b-256 | ffafcdb27569eab16bbd9c5621650f58f7e773d8ef8d3ec4996a36ee6d4288ba |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91e84b5f4c99c549a5117af14da9b3a15e16a392b0ce9b17fd9165396dc05242 |
|
MD5 | 8114c92e909763c16fbab851daa65ed0 |
|
BLAKE2b-256 | 7ae33cbfccaa45703c47ec3649444960b493797cc3f9d29d895529a18133f751 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53caad392ed761c9b6f146f127b39346b2f9b425995e52497b2f1c6291176c2b |
|
MD5 | c1fb664fd340a16f231673825931b6fd |
|
BLAKE2b-256 | 495f221cc72535ad2d0bdd19b95afd9f2762a6abbeed52322d6c9a2c8d39cdf2 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5de28d72b538051e3423527e69f6753aa9ddb885d615c84d545bca16beb094c9 |
|
MD5 | cd7480461b48cc48b8a4335f3365eb01 |
|
BLAKE2b-256 | a2e4fe89c288d5eb567c369e2b694e2c08ffa98ee63cf1e712fa8e8e95cdcba3 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3240464a5df35f039f1a03685d04fc324d21258d7fb23ce0dd7da4cad3a61816 |
|
MD5 | 524999e43ee96bdf7dc0d94fc3fa6652 |
|
BLAKE2b-256 | e9dae067cfd2cad9764bb78f1ff8388077e56592b8680f088dda671447ce0f29 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8687ad0a37d0133d3eb87e81b908d51d41a7f4f1603fba59aff8b1cda2119de |
|
MD5 | 811114b6668fe6a47883ea8588e364ae |
|
BLAKE2b-256 | 2f6a33928c839307b9d54779edcb659ecc7d0e9ea5a8a3faf14542858382088f |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46feb31d03eda1d9141dafff81857ffc5eec004e24d4e5c97593d73ceeee96be |
|
MD5 | d2a674f422bf654788469a004f8e6026 |
|
BLAKE2b-256 | f08622b3b9ebcb4789234349a87f97eea85a250b1652883dd50e8446cd12c8b4 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 922a3b38ab859ec3a10cc6e8004259aea22531bbc3b0ed2ad0f73f16a9525151 |
|
MD5 | 2078459eefcf3c68991b790fd94ce2c3 |
|
BLAKE2b-256 | 8c1ea88af08588bf02fd642564dcad1d60a0fcaab335af48046410899717c99d |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca25acaea94e86eb027ebfaa2064ab2f32968387276666b3b2b98bb6983f373b |
|
MD5 | 2d60fad28af5405b546bfca01335e642 |
|
BLAKE2b-256 | 0d82c4babd48ad96fbdcb486b840673e002d315b1ddbbf81263ac93fa455aa5e |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd70c9e4d43e233b61a23b8056c3b7d8f6148f67f8495f42ce0d0a45e7ed6850 |
|
MD5 | 5995856a79dc079812bf273b14c45ecc |
|
BLAKE2b-256 | e4397c6186dd73cf9d5fac28ead08065c6891b81cc4c99c37b58dade30fd6d18 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad95687bc0f9129cd039f45f5a1bf8cfa09eb6d3b2f57d7167424dccba8547e |
|
MD5 | 69d876cdc895bd40a7dcc9a629fed7b6 |
|
BLAKE2b-256 | b07e90bc56a9b6aa20dabcf2cef75f423610b0dd84d00bf67c0efabb5336489e |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac695a6c977787a3b6ce42bc88b5ee584981c94b5059b9dad9b4c585776426a9 |
|
MD5 | 9640fa7731ff6477fe72a3c9c0ddbd52 |
|
BLAKE2b-256 | 2b970bb122cf7aa75fead2be8246a7a7c0cefb170373fba97841add778cc51bb |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b814e8e846110fda18e8f4a7f7b6efd4889bd9259dbd191f3fb2fddd1608beb3 |
|
MD5 | 2fed2e5a3d2ed6bb8f342bee9519e4b7 |
|
BLAKE2b-256 | c16f9b0f25f4e3669500fbee761101f54787af7a89fddc9593f588e4139fb807 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5211dcef027e193cc542e500e6a693a01a535874c82dab6db60f7af3bbead1c5 |
|
MD5 | 9fcef0ddc12841a300e237c15be17acf |
|
BLAKE2b-256 | 8ed7b7d485a130c67cc6614b5607719de3fbd95c478659d1fd150e898573aec1 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09324207f9c1eebe7ebe400bd7ef9c6a2db45240555bd441ef75432e86340f1f |
|
MD5 | b2fd48e8d403290a9becd34f758db64b |
|
BLAKE2b-256 | 6ce99cfeb29d2d2f96f7044104529e30e8ddaa663cbcafc7484e4c8152ff5632 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5fb3d2e8fe88bc7de66702743ac5e824e5a8b0ae97a76102704fb090aa91993 |
|
MD5 | 6a6880f423589d507d51be2d09faea27 |
|
BLAKE2b-256 | fda21b2241a8a7cacc6449ac3dab5e77856c7e1fe52936f7b473187c4712b6f7 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c35fba7eb4ffb65b25247f1780986720fc677759d720eb779b8820bf8f2f3666 |
|
MD5 | 2a7a8b51f84622e52c6fd69502ec2e21 |
|
BLAKE2b-256 | d879c52d3a35f10d6a8032b08963b81b30d82629a3052e13a3b6a1ba2c11d666 |
Close
Hashes for pymedphys_pylibjpeg_libjpeg-1.3.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e61cc6efa602596b24f0b9e4e7bd11893099d6a37d0f49f1d70ef90c2698a3a |
|
MD5 | 63fd9d29862c1cb8dc6e2d3bf743b5c5 |
|
BLAKE2b-256 | 07d6c06945e4b43a0f407066a938409a925f447cd87a8b644b23c7873fa285e2 |