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
pylibjpeg-libjpeg-1.3.3.tar.gz
(682.9 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c9d0a236efcac1273d8899f9a54c6c72773f1b66130082720034c0126e6ff8 |
|
MD5 | 6c0870e04931a50119649400f8c3f42d |
|
BLAKE2b-256 | 2da6be1465fff6b01200de905983303b3d6cffc39a22790624a818ce91980a25 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe940e4e2c2f3c82476602cd6747492a6f415386ed2d6ae0364b5d3c4eb8b12 |
|
MD5 | 333b6ac68d328cd136ade52cead216dc |
|
BLAKE2b-256 | f31356984cdcf44f8c4d3ac966e4045a9023b0d0bdfa9225cead8e544c56db10 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e8009e2e5c3ffbd91d710311e860e07452db1dcf4c2ee5302fb3d7a73ad90fe |
|
MD5 | aaf17655602d6fcf8b0cd5d2752467ec |
|
BLAKE2b-256 | 6ddd32cca2e1f7512053961c57054b5edba10fac576dacfc0fc094681a70a259 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ff26f1360f5447d5be40ec71af539c1001b90717335a72f0f5804e887016cd |
|
MD5 | ba623ab2b77c3ff41505b66dadf02ba1 |
|
BLAKE2b-256 | 5e519fb1931a972ee1da5ac058658b5900dd205e5f711ce816c984e25ba77df6 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee794bc9ffc1566c0545a5eccd2ebe357e64251c58fbc206a31b10a07886afa3 |
|
MD5 | 0075185652aa4012b4d3e6efb3459df1 |
|
BLAKE2b-256 | 154fb7f7fcff850d9c494bde3fa616239ac08d25eb2f60957ab9964e33af6efa |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23d209134fe3076a7cd7a15398ef37cb41749ebbbef610f68f8e12b875e67a6a |
|
MD5 | d54d7d8a629b4f385f32ef361f79f475 |
|
BLAKE2b-256 | cd8139a3fc8477e7b96e2b469cc064f144b3df40c4e11cbe6afdf5b523d2e20e |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 676fb4addf01b48d876eb297c13069bf86bd34d64f2582ef2f6a921023b33334 |
|
MD5 | f3c5402ce808a5be234b09751ebc50dc |
|
BLAKE2b-256 | 9c6c16d49e08ab1840846cb40070745af49dc137a9150b5273fc589ae094130a |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bc8912b17721a9260bac359bc37bc10cca0f44d7361397eab01da18c3403f39 |
|
MD5 | 04e3735d3a30975afa4e08396fd9a0dd |
|
BLAKE2b-256 | f40dd6e3a29ffff676f58d205f5b4949ffd83e60cac99984fdcf0e9ea5b1bb3f |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66a559b24918f3ade492dd17d814db70295318365897f943a564621dce30b0f0 |
|
MD5 | 6eb62db9d74d506e57ee84f3bc556ca2 |
|
BLAKE2b-256 | ae394e45dacc4dc352aa2e932816926b1d4c52b3a3d2166c7f7a712159a4787f |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430c0ba4b08046d6b3ae7da115ace30909464f00f22e4d8933216419df0e0dca |
|
MD5 | 9024e3df7fd5c027e108276b0241dbd5 |
|
BLAKE2b-256 | cefc6d000665dd79feb15ffadf3dd865bb90a39bd9ae31e90b36afbdd1c7a761 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7236d19f6eba04582ac15f4d433b78d912a20a7d4e254192f3eb0e79ba8f1c9 |
|
MD5 | 5d0991259b3c62b6639cf349623968ba |
|
BLAKE2b-256 | bf194ad04671094dfd6c32863c36e50c0e0a6bae4ba757c8ce81dc29691fd529 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1eb4a8bb8db5d0bfe660dcd28e7b646ecc840a954640bb3f970bdfc5cd4029c |
|
MD5 | 216f7ead3abe59cd98e7cb212f702bc4 |
|
BLAKE2b-256 | f28bd77bc0b8638ab7606e49a77e840bec0aeaf9593a0d24a326243e0a0beaf9 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f62da2223079157b7c465a4bc20bd73054d6cccec75af72cfefc6d445c0c29f6 |
|
MD5 | 4c01e31a97d1ff054e484c080a315c6b |
|
BLAKE2b-256 | a6ffa23248a495cbb6826f99b3eff1bdd0b478b61e9213f02b153ee4f7fa2f4c |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5690382ae1d0f968c9e3439a3f982e1182beb2da57aab48d1f0e8df147392dfd |
|
MD5 | b2ff6c8a49dc96c9b3bfc79cf53fd3c1 |
|
BLAKE2b-256 | c8b67f17e500008b2a332b71c8a4eaaf6552a922a2866536cc4ccf55c3c26014 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fdcc1e34ddba81c8b88205d7b6e3e9e4f6cbfb3b1b55c0684c206d3928264d |
|
MD5 | b73fe74d090ed257c58b73616c782889 |
|
BLAKE2b-256 | c1b23735286d7466bf6a6d674cf3fafe592a8ea128eb67125c4ead16e3b60922 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d151464030fa0ef75ea5c4aeca875174e8642c874baec9f049880f3f0b5b63d |
|
MD5 | d799e731e6c6dcad2fac3e04c4b1ac2e |
|
BLAKE2b-256 | 9a78e1b3c1149a11f679660009f32b3bb4c6b712c4c18b2ae46d98fc2c51cc18 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf8481434f697e5efd8d5748772e68d6af98309960e1de864a58b9d7e9cf4eb8 |
|
MD5 | c969792a87f9ee166b98485faaffd70d |
|
BLAKE2b-256 | 8e2b5583721be87a84c7365204671f47bbf146cf2602aa41ba18a4a2642f573e |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e5b741959464712116b30e9886f14e08a116cadb4b04c027e2f8e55cfd9e8b2 |
|
MD5 | 87f2b768bfecd76697208c1179d42016 |
|
BLAKE2b-256 | bfa9fcd4fabec042e4900829f69f8c898d70ab532bfa635faa7af7cfeb8905be |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 111031ec9030950319062ddf1a4ee958ddeaf0c9a634e12d355024ae7ca09e14 |
|
MD5 | 3c7468fc31bc873715e30d0497f3a5f3 |
|
BLAKE2b-256 | fe3e5eae95d6682a2c5fec8cdf9530be20c066168df834183c1a737917229204 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cc7db8d1fe0e295832f991e72eb74f849db43e580f2c61340f7bd779636336f |
|
MD5 | efaa2720b614852691941911cbc0fd1b |
|
BLAKE2b-256 | c7d6545a17434c9c0b54fad59538b776a8313035a7ac6ca884034e82a30ae8a4 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4936498e74ec19d6711801abd2bc46162f3b1049a0f7ea1b95115636e39a0d43 |
|
MD5 | 1daa930678a90cabb835ba1f32099b1c |
|
BLAKE2b-256 | cccf8d8aa714b811d120746e16d3ff6b76c3c8691bfd407775bb77e226fd3017 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c8cb1264c0f8a7b75e0e6234721261f2fc99fd75cbeacd27e0c2d71e7052e5 |
|
MD5 | 743fda8b3f87a2e8febc7c61520d279e |
|
BLAKE2b-256 | 96185e4c171b3479225d7acb9806253381c967e46e6ca72e20e4cb4f0f1fca06 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d7123d4261793256673ac561795e6dff238f75b158713a9599e6a3197983986 |
|
MD5 | b82bd465672faccaaf9edc0aedc2556f |
|
BLAKE2b-256 | 1ce2730b23b356aaf001d67b07efb8dbb0219552e39eebfcaf5abcfcc8502819 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d4dc0d27b9a4678103f7c79223c31626fb227dfc655a21309fc7e541b3684c0 |
|
MD5 | 6f806af68d24a39e68a4d04be70b9740 |
|
BLAKE2b-256 | 9ebc3fcc4fae8fa8549ce35fd51adfa28c94f9ec057a47a14359e5adda96600a |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0903c1066a5316e52e4d16559b7e1808c3b09bdb01935c61bac67744dd5c4524 |
|
MD5 | 34e056b221351792eb7a43032ef14f01 |
|
BLAKE2b-256 | b83af2306521ebc11173df9922ae5f8d74e564c71d804cb95bfe1dc57bfc45c0 |
Close
Hashes for pylibjpeg_libjpeg-1.3.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1eb80fa8b21f477e446a2fe9f691d2e13cfc9fbb091dffad317c6a491a1e71 |
|
MD5 | 0b91d001ea5f0a5bd10a84929e75ccfe |
|
BLAKE2b-256 | 7717618e6b31b1b5094cb467a2ab231a98e3dd5f37860659cf6e276606c9dacb |