Skip to main content

jp15

Python bindings for OpenJPH HTJ2K encode/decode, with an optional Zarr v3 codec.

Installation

pip install "jp15[zarr]"   # with Zarr codec support
pip install jp15           # encode/decode only

Basic usage

import jp15
import numpy as np

data = np.random.randint(0, 60000, (64, 128), dtype=np.uint16)

encoded = jp15.encode(
    data,
    irreversible=False,
    qstep=None,
    num_decompositions=5,
    block_size=(64, 64),
    progression_order="LRCP",
    color_transform=False,
    planar=True,
)
decoded = jp15.decode(encoded)

np.testing.assert_array_equal(decoded, data)

decode requires no dtype or shape hint from the caller. HTJ2K codestreams carry a SIZ (image size) marker in their header that records the image dimensions, number of components, bit depth, and signedness at encode time. decode reads this marker and uses it to allocate the output buffer and select the correct element type, so the reconstructed array always matches the original without any extra bookkeeping on the caller's side.

Zarr v3 codec

OpenJPHCodec is a Zarr v3 array-to-bytes codec passed in the array's codecs pipeline.

from jp15.codecs.zarr import OpenJPHCodec
import numpy as np
import zarr

data = np.arange(64 * 96, dtype=np.uint16).reshape(64, 96)

array = zarr.create(
    store="example.zarr",
    shape=data.shape,
    chunks=data.shape,
    dtype=data.dtype,
    codecs=[OpenJPHCodec(layout="yx")],
    zarr_format=3,
)

array[:] = data
np.testing.assert_array_equal(array[:], data)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jp15-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jp15-0.2.0-py3-none-win_arm64.whl (108.6 kB view details)

Uploaded Python 3Windows ARM64

jp15-0.2.0-py3-none-win_amd64.whl (164.4 kB view details)

Uploaded Python 3Windows x86-64

jp15-0.2.0-py3-none-manylinux_2_28_x86_64.whl (256.9 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

jp15-0.2.0-py3-none-manylinux_2_28_aarch64.whl (179.9 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

jp15-0.2.0-py3-none-macosx_11_0_arm64.whl (138.8 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

jp15-0.2.0-py3-none-macosx_10_15_x86_64.whl (207.1 kB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file jp15-0.2.0.tar.gz.

File metadata

  • Download URL: jp15-0.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2fcc2e1f11d2dae6ece55b7d9f0f97505652ce01a0116771616f4f4f50f072a6
MD5 52db29b965b02f639f71430d59dd7288
BLAKE2b-256 a2cb3e6916c1bfb18eae2e4445ca75a7d53b672d308104e8c94ba781ed54b8ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0.tar.gz:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: jp15-0.2.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 108.6 kB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 4367e3654a1e445948456c99430ff03d94ec6d2da9c8f2ea209b45dad10a28d1
MD5 2e3410eb76a5c653e8d762f1ad2ed859
BLAKE2b-256 958bbda48658ba332fa83fe21ac9b24808daa88bde3a09d6ba2315461295f582

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-win_arm64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: jp15-0.2.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 164.4 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c7fe54e07413f29697b836cdbca1f209dcb76838bc69f7e218a8ee199ef26cca
MD5 bd1033c832488cd7aa813d405b581bc2
BLAKE2b-256 d2c1b2c0bfce1e43679e279d53eb1a18e3489c9519a9459da243615c3c87740d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-win_amd64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: jp15-0.2.0-py3-none-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 256.9 kB
  • Tags: Python 3, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 60b87592539bf58b493dda6980a4ea4fd4cc8c7a0176991330e2d970da061be6
MD5 2f426ccf758855ce7e030e713fb14cdc
BLAKE2b-256 87244defa670cb59feb81e6480b13b600ecbb18090404e1c4eed5f7756fa670b

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for jp15-0.2.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 007c9452633f934c87cd7593115a544cbb1b6065bf4264c4b1aea1acac1c22f8
MD5 110f0a60dd8a4e6da36057ebac17540d
BLAKE2b-256 eee59cdfe005bafeb18a1ec77e170b2342c1627f440f92607cfb9626a9916997

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-manylinux_2_28_aarch64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: jp15-0.2.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 138.8 kB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 785423cc3ee771a4077151bae1bf0ec168d50b2bc9c183b72e67de155e0fffff
MD5 2429a3c0bc20703eac84494462d2a04f
BLAKE2b-256 524fde23f03ec8a5126f6e017e338464f3e1e873dd59f1c3408cfd2cab726a45

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-macosx_11_0_arm64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jp15-0.2.0-py3-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: jp15-0.2.0-py3-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 207.1 kB
  • Tags: Python 3, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jp15-0.2.0-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 99006f751011af608431d75d6efe83f692b45e919db481ec30c2d0e9625c39a2
MD5 2a3c3a3b55df6a82145bd4e8e354d314
BLAKE2b-256 8549791009063916f0931b91ec5eb32f44c1f23cbd5318901daefb175a412c74

See more details on using hashes here.

Provenance

The following attestation bundles were made for jp15-0.2.0-py3-none-macosx_10_15_x86_64.whl:

Publisher: python.yml on Clepio-Biotech/openjph-bindings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page