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.0.2.tar.gz
(667.1 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8484d265aa7300f1b2e7a3ee650b48328fc7f57a3eb1fbf4a23a50c6c2a4634 |
|
MD5 | 9658a788393331fcdb23ba1e97553cec |
|
BLAKE2b-256 | 002fcbd1c1001dc63d47966ec9b58e8970ef9a1bf20497d15fdfba94b22180da |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3241f0c535852f04831b9bc085dcf7562ad6bc45041ce6820e9dd611a3f967dc |
|
MD5 | 6cebd81fd2907835b1778ae146960657 |
|
BLAKE2b-256 | 1c0f9961fd3a670896aa46e5e29e3393985b0f1587080f20a409469dd9d455e6 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa99eafe51175a65f12ca5ed0f885236e6ef65b976810471472169279dabb16e |
|
MD5 | 1f104d123467a53e2d6f083804d169f1 |
|
BLAKE2b-256 | 041d8464710bc6cee66a514ea94b51f7b771853b662964f231816ef15a766ddb |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77fd729f9c3e84aa4e41ceff419e31dbe4ea94ec35c04d36b5175ecb3cbfe540 |
|
MD5 | a7bbacfc1d7597ad395b49ab9a39240a |
|
BLAKE2b-256 | efd1487f5b6c14b4f04138d1592ac6f873f7feed50b284db9386f34df621b94f |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcc01314f719d5da40987fe387d89ae0f70194c3ffc7e598caac0ab279be206e |
|
MD5 | ba0a14322e0296420ac3653d206a845b |
|
BLAKE2b-256 | 58cb75c4a177127b3693b59075d0f6a2d728231f78294c458e49c5158c44bce8 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6460bd3ca2cc80c6c172d1a6ff7a61d9da86c8bfcf6a6edf69b915dcdf5b472 |
|
MD5 | 939f74422321b78af6a3040a37a53dfc |
|
BLAKE2b-256 | f88be325585ac2a656856a25b56b0e907a62166727610941a35eaddb8722958c |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cc4414be4bbbd45e8fad6de171a2b373573228922c953fe7c853acbee7cdcc4 |
|
MD5 | 644594457c6a257ede094536e8335b7a |
|
BLAKE2b-256 | a87c2bd4aa58e9d9e9b0b71071d3e0466dc0977bf0e7adc65bbf63f149ca48d8 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af7651394f7d7cf7cef8e25c6e63813f233acc6f0920493a93fdf0a0f5250467 |
|
MD5 | dfe39da128ec69cdffde9b09bca532ba |
|
BLAKE2b-256 | 208761a8a1c836fbbbe5c0799666f3bd1fa43b0aa9022cd4d1d9ec080b8fc53f |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59e43b37b727b836fb0f2ffcaf949beec04ec66ea9700b7a148c59fb9249988b |
|
MD5 | cfd53d79031eca417656360524e8c583 |
|
BLAKE2b-256 | 54b40073a65396441dfd5f0fa6a8fd9b9e7ce115d56092ff555008d89680c324 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7538a125a2159139c857e887e770194aa4cc848d390e723c084047b3f693ba9e |
|
MD5 | be1db53a900d6d35f95a2865b8e28cbc |
|
BLAKE2b-256 | 4de2a185660e0aaec40878e3457e0976376949820559eb164f41c317c5574cce |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d304ee51d9eb9b0cc9f1ba2d1e802a712548941077b94e3d6ad6f190b219c3f1 |
|
MD5 | 4f2f7b1036b239a87e7ff4e683aeace5 |
|
BLAKE2b-256 | d9ddca3fcf9be3008cf5828fdd535ffb3bed7c4690d7d65d16c18e09fae000d8 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c547a6362a00fa894a149c64fa5188328dcaf8b7691b3a36f16904404f082aa |
|
MD5 | e9a2cfefb4dbfe3fb37be2d556b7d669 |
|
BLAKE2b-256 | 23c210f95941b2f491c21faae4c87e686de45b4d7a01dafcb52c13ecb37ebb82 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0201e1d83374b0e59ccccdb7b5a74afe2a29c5fbc6b280606d0d2eeb1ef291e7 |
|
MD5 | 429ac35ee24f1e270e83f0f040304f51 |
|
BLAKE2b-256 | 807fc0457abb4ba10a01f4eabfeffac6a757967520e608f237cbe7f0b4662705 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc9e067933cf1e2072ee59bbecfadf53510e3468a9523a7da0b56cd00d4e6eb |
|
MD5 | bf87a5569f07e1bcca4b663722a26d57 |
|
BLAKE2b-256 | 3f3c56d7f156afe98bb1aaec6b5c95fb48e1ecdae852f32c2f9b1f40779b81ae |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e575d3eff431ebadf3b4ab8f0d99f06326906d75c5d67ca435b5afe3f2cc2cb7 |
|
MD5 | 1ec3fda64499438a22588603f8625902 |
|
BLAKE2b-256 | db193a31b428c554d9e4d360fe58b4663928469d7f4bd2c9162aea516619378a |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19f83bdd490c0f90775c699a870ea4584ab76afe7c9a919cdda898ea8f4bb98 |
|
MD5 | a19c607effa29cc1925b0a613c545118 |
|
BLAKE2b-256 | 6d7fedf89b6adea312ceda804db73e259d94b3867cf6e7b4c71a5a1d543e3d47 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60730ec8e8111c82cfd20a8b72449c105187ea4ffa2b247b53736d1e5fe39b88 |
|
MD5 | 0c810ee5e3e9107a4e7d1032d1ac35ff |
|
BLAKE2b-256 | cbcd41a0a006825c81bdcaf3695c93cbfdfdc7d78502a56619b751a86c4801ae |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9500f3ddf4dac95864b196dca8e1f6c4326b8e28bd08e4934f9ee7b82130fcac |
|
MD5 | 87b1454d2718e29537a3f5794fae179c |
|
BLAKE2b-256 | cb1a59411030654cdaec58db91ea6e269ee4720c01b8129963c41066bb3b2a6d |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ac4419406531e2f618491c105fa6710ab9ba1cd9265b7205ef167001f4a9fd |
|
MD5 | c33488004e174bbc671421bacb60aed6 |
|
BLAKE2b-256 | fb1b549eb90e36aa07ae666182498ac2ff05388ad831cdaa44ad68868cb973c7 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb9327f44453435c99b83e2ae33070be311ddea0f8cacb5e51b8a159bd681f58 |
|
MD5 | df7ffa09b7b6852a19f515d681f31b72 |
|
BLAKE2b-256 | a09aba4bf9fc45b89eb18abd216add9ba744597adfb2fe4d7fb10ce9213d32b9 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c6c3f4f7d31468f2ebb831050916f7fd7bcbfc5bd7d14dc07b72d4380145ff0 |
|
MD5 | 4455722f263f997ed6ee6cfa0a43751e |
|
BLAKE2b-256 | 3bd6cd2097c21d56b6bef79ee38ff07fe5764a29e3857cea89dc81af998d5b20 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46d63b14f2e5d6f525484931eb4700c1edc8727df5b7f67faf281e37a71eed6a |
|
MD5 | 36d2b17ea1889b7223c58cfc689ca8f0 |
|
BLAKE2b-256 | de103e7ee2ca576d0245cec39567fc142f4e33407df237391e478eb8ed2ae67f |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 321cc914dd31d8ea3c9d0494ef94a677da05081088c1bf1637d5b33a13a4229e |
|
MD5 | b4b8c13042311f1da5f53c3abf6e1594 |
|
BLAKE2b-256 | 7b9dae2b8782c16f98ae62e745cb75e0b0689092a4208284586e889476266796 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d392baeb72f00b5ef79299596f7c67ae5f23c0bfd1cd3cb738309d7727df25a |
|
MD5 | d421f5750bb5d2fd5a0605d0db587d1b |
|
BLAKE2b-256 | b64f491bffa8958ed59b666c04703e42483cb93c85b5604169e9ddca37fae5e0 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ce0982995d5c78ce4127bce27cf52a4ac84ff9d96e2ed5849c952f956d372f |
|
MD5 | 9cfc70c1ae221ded70318a4fc648c46d |
|
BLAKE2b-256 | 2fdcdc639508cda7827b945dbe99e4de80f1eea0f0d7f4b6d97a4e0ccd1ab759 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83263d46101e95ed3c4776de93be6db71a0371746ae4d5bb303a78d34d781ee9 |
|
MD5 | 1f6fe415f8711199bb1cd73bae4a0239 |
|
BLAKE2b-256 | 1f658199e0d2cfff28d2b1fa397019e782d05cfc8e39eaa2b77c23c2b55a5ebd |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f85399a2269f1e2604832fe9b9ad77216ffd0d4ab2f525fe26aef8b68b2a30b0 |
|
MD5 | 07bf72dfccd3ea45a08fcb086eee5302 |
|
BLAKE2b-256 | 6bd994dc0e8dc74058992f079c1f86f3caf05feb718762c1e8bdcad4cab3caa5 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f1c18dfce48173a369dffcbf616748b44d3bb8be5b2222bf1e16ca727557222 |
|
MD5 | 42cfb6b3a4c97d35d705024ea19b75ca |
|
BLAKE2b-256 | de3dec7c1a87548f8ff9dd4ede0eda2c481957718f0d12a50f82d38f4e3d4b1f |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9942e6f427dadfc1fdf88a40c561966e4510ccbb68a4939b9720322ed4647de2 |
|
MD5 | 893d7802212862ec662f050c218e4c02 |
|
BLAKE2b-256 | 927890e58977d980248f260a3a619675ba1083dcf212c666be0f4cc4c6596755 |
Close
Hashes for pylibjpeg_libjpeg-2.0.2-cp38-cp38-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe17d917e2c2b7eb8c0f99b26d65164d6114c28776e11df093d4dc0fadade739 |
|
MD5 | b80b8ded6ed45f66eb30b6469e437f0f |
|
BLAKE2b-256 | 8e6c5d2cbc0102b1c3938cda67c1396a63205abf9bab68949d30c3427d462f5b |