A Python wrapper for libjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
pylibjpeg-libjpeg
A Python 3.8+ 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
pylibjpeg_libjpeg-2.1.0.tar.gz
(669.3 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9faa42d0249d09736c7057b68ca8c825a5693dd68c95e4750e9df8967d7e785c |
|
MD5 | 53e542ab7848b43e1a49c5f8cf24a18d |
|
BLAKE2b-256 | f0a13457c5c7096a28ea31fdfe3e5b0a067b0b616e13e0da46bf0aeaafafed4b |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d280cebcef33d21556bc6b4d78ba9d649ae872921fa09890d58862a271f208a |
|
MD5 | f406ba2efe57cee5f1db8e15ad4e50d6 |
|
BLAKE2b-256 | 5fe035fcf046fd767366d7369272b37eae1fe3d2e33683b578dfefab5a47ef3f |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb4be982e97eec2189bf9b11adad53186caab49beeb0f30c551b879d1aaef43a |
|
MD5 | 255e035aced8a6301f84ce5e31b4fdbd |
|
BLAKE2b-256 | 2c1e457af62ba13783f41493d7fc99f27bb4ba1a6f662a57163f4247649eecbd |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126b9e450c0884f2f1bf87649174b08d0c8c8ca3e7efff573a0ecae8e26e1666 |
|
MD5 | 40dc7564d6072b18dbbacbb328f7d1db |
|
BLAKE2b-256 | 124549fa5f6b714cfbc9969a9cd817b030b32c93bfa620626cc420b507b6957f |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d54b9fde7130502e2025810a769aa83145e7b1b296678ac21b61237b357cf5c1 |
|
MD5 | d3e243e1cafae84f4ae4c9cadf8672aa |
|
BLAKE2b-256 | fae6e2be1357742c47cf1d5cd940c88bff1bc15259526c143aefddd7ddf4433a |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f01a21baac699c41a3ac62a73238fda3c90ef06f4008b7bf22f76100a3d33572 |
|
MD5 | 7d86815906a2cb22236c9be8dbc622e1 |
|
BLAKE2b-256 | 33854fbc5258b456cbb9bb1c8575d816723b58980e1ec890fa9c54466a05ba79 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07d859cdaba0f9ee686e4c98133378db9b8cf87010b8e67ceabe88b836d7c4a2 |
|
MD5 | 3bd9b53365562ad2112657113f4f849a |
|
BLAKE2b-256 | b03b572ac26f5a458d6e5dcb25e884edba2acbc9a047680d989f30568292c220 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d24d44a1d4807360e5bc142c4cfc21ff04864314312064eddb1ee0a476f51a |
|
MD5 | d65f9617ce830dc7c42f5ad005235ab4 |
|
BLAKE2b-256 | d1a8a200f88f011f94f8495ea713b102b4a28875ef51368e792f650a407001c7 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5001d39a8c3d11b7afaf131365d5d0466c6d4ce7b1e83ab4c838981314cf27e1 |
|
MD5 | 70b62e17b961b94c55ab833f44d1e0a4 |
|
BLAKE2b-256 | 3b4a8debd5c101f4e590c13d9a9f7e6ba9d63e01acdd0fef126fe9f3737b72ed |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea723fa0cc92e19402bd4bceb03d28317ef762b1fab486311de5d2d7eaec712 |
|
MD5 | d771bc339725913b1d278b939ba44e6d |
|
BLAKE2b-256 | ba7e065b71e98e6823359b2141f2e9ae99c5a56a1bb42100ad5dea431dec2f99 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0213cafc66f57ecfe3283ed1ad5e457977b68f7a7a57c0f2cbe322eac1c9967a |
|
MD5 | b54ab090d59b625bf603a57506dda1f4 |
|
BLAKE2b-256 | 94d315fa00337d30850e6ac2e50af8393fbf231b0337ef6ad861c06eb97818b2 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d25b79846343af4ae7392bcfb08d350941594dee5466bfe30ec69228af30496 |
|
MD5 | 66b591a7ed11798e6d55215b86b64e6e |
|
BLAKE2b-256 | 60d6fbe2141e3e8890b8535adea6f0de2e3f66ad03e1f16f0115151965a35684 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2d3d7466a621d7efbd0933e3940a38b28ab68e23ffe572a501ada8b946c712c |
|
MD5 | 5f72a95ee64eef1836ec1935eb3fe403 |
|
BLAKE2b-256 | 40da48f2837d5d0ea7b66afe5acda447d3be681ef96c678818d637854bdfd8b4 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feac4bd731946bb05f6c5a06ba09d72a7e46e411b3b43d85a5e323f45b1ca96e |
|
MD5 | 9ef7f5630b5d3ae9fe4fc4db5d114f38 |
|
BLAKE2b-256 | b75bdb271905c5f76e32d98b48ae34ca7ff0c9d098ebd16289c422b3a62ca9b3 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aee2a1eec740e78a0d3688e6cdcd08b7cce8b4b7b625bff48a384a70f311b95 |
|
MD5 | 368e2e4c6391af8c1ebb55db14bb4943 |
|
BLAKE2b-256 | b3819fd07a20bee8fcf37d1ad6f6c87c75878f21f93b8649bcd8cb45ecaa9917 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8123f314d8887e1062dacaef226997db4bcacf708dd60d2985584c633f4520c6 |
|
MD5 | 2d515df830335e913f340df77a494bb5 |
|
BLAKE2b-256 | 697ab2095e969f8192e25c9c7706d78a19169d004860951565003722692c3378 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e71caa48f22804bd33d810706050caad6c2d85401c0a4fc990dcfe6e545ebd97 |
|
MD5 | 2581deb0d27a2b8cc8134bc70eb6112f |
|
BLAKE2b-256 | 8cab4ea9ba414bef67b611386b79b4c76a2a5796a355b7131f3ab6ae7921f5c2 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f8d98549ec31b25dc3c13c8a2a69b2b2e5e17793638f144a10f53d0d5133673 |
|
MD5 | 845549b0a04ea3fbf78f317caeaba5f5 |
|
BLAKE2b-256 | d351432e8a5c140d4d042961bb378be400370998fa13ebd3ea5cfb3076defc16 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aba4f1f94970ffaeca6fcc19ba3a71e467dff7d2a479486a5557e7ed43e94dc |
|
MD5 | c1b697dd4a60287eed64eb472397b1eb |
|
BLAKE2b-256 | d75283e60c6cbe67d34f7e39baf7b255339e700c94a6e092d53dab66760cb638 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9afc27b855ad66238b07f31794f0beb7c5a31b9eee5762ba603bb2421a1f103b |
|
MD5 | d8a2f8c26183164670275f5431f22652 |
|
BLAKE2b-256 | 888fa9669f5bbc1b934204d6dd8f9d616dfa86c4971c8e5b7b4cacbf4867b84a |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af8968cd8f0958429520ed1b62671d79ca59b45cbf98c5250108208f2d6176b7 |
|
MD5 | cea98519351766aeb77d7338203e44f9 |
|
BLAKE2b-256 | 3c3ab66606c2fc2afe32d9f52335fb8a86c10d9d4d543aad8140daa958679f2d |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1528c214557f8bab21529d578329190ae59e875d3a90816de49a73865bdb58f4 |
|
MD5 | 0db0f34beb840e967ed006b45c452e60 |
|
BLAKE2b-256 | d8ead9a90a9e1845c618b590e44582861f6bf8adcc2574ee0fb6fe8f44bd8361 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61951c34cbc3e1f075b7cdf53f1ca7e552f051d777ea299e70e7bce5328607c2 |
|
MD5 | 382d0717be23c76a85556e399a402e82 |
|
BLAKE2b-256 | 1446ee64591682f0aad715cc64a5c54dba1ace372ac906ff365c0985db3879c5 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 410853921ee25f0ccf2e77756867e2db23c98ff7f2ce68d12c570f2c92a490dd |
|
MD5 | 82cebf7e4abd42a8178f543372bbf1d7 |
|
BLAKE2b-256 | 3a3e5b10f60c2dc1de2bd5c29ee1adbeb1ca339a25b5a34fcd78c490244251a4 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865824a3bb147236b3f7b5645bafa2f2ec5abeec6d0c596bc4afd3e51bdb5eff |
|
MD5 | a7a62a4010f6aca4bc73647302ea8ac4 |
|
BLAKE2b-256 | 248f705d06456c3f9dd0b660d269ed76cefa2c8ef37d8524b5f49f6e47330fca |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4613c2b66c864037c6e7c18d355129a0145dc51824e13fd0a54967981eb08675 |
|
MD5 | dd4e8e63b883abadb5f8ee61241d4b2f |
|
BLAKE2b-256 | 88daca99aa3e70ad6ab2b3089749d59280dc031ab22ec2d7f9213750a0d3625f |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b7a12d30fce238de871f5327655b1455b716fd54526cdabcb2c896798f43b15 |
|
MD5 | 3fbf967918591a37e6a3ebe5335c2a2c |
|
BLAKE2b-256 | 1c5265e151ff07e9353f3a4a123d5e14ae5f872dc1c0b32b22d55f954dc8b064 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a6e7c3045456af90e7746e36ec186587f8ac625061c6532018716a003ece5c2 |
|
MD5 | 1c4d7a14a1e3c3ff2751f9a0b0a36dc6 |
|
BLAKE2b-256 | a08e3ab1bc6728cb93bee1326452e73b4de1d487686020003e3bdd20dd870f6b |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6871ee72a3a631e0e07239da5d09b01d30304b9cb9ce8d95169ffba4657d7e3a |
|
MD5 | 981cd439b23a052b3454fda0c6eddb73 |
|
BLAKE2b-256 | 045de6d42c5a1b94c5be32169114f291d2afdb98c32cafd1af7817e59984e872 |
Close
Hashes for pylibjpeg_libjpeg-2.1.0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f41056fa6e11f020c32814ea8f78414fced26220c4581f670beb551d87427a70 |
|
MD5 | a5de74ad90c0c7b0561b088c9a951d7d |
|
BLAKE2b-256 | b3bcf77b2581f3ba1ea7694fb017a43ae9dc611603d034a9406731a188a4c888 |