Skip to main content

Python bindings for ISPCTextureCompressor

Project description

ispc_texcomp_py

Win/Mac/Linux MIT Docs

Python bindings for ISPCTextureCompressor.

Installation

pip install ispc_texcomp

Building

ispc has to be available in the PATH for setup.py to work.

Usage

from PIL import Image
import ispc_texcomp_py

# get the rgba data (of an image you want to compress)
img = Image.open(fp)
rgba = Image.tobytes("raw", "RGBA")

# create a RGBASurface
stride = img.width * 4
surface = ispc_texcomp_py.RGBASurface(rgba, img.width, img.height, stride)


# compress the surface (no profile)

# BC1
bc1_compressed: bytes = ispc_texcomp_py.CompressBlocksBC1(surface)

# BC3
bc3_compressed: bytes = ispc_texcomp_py.CompressBlocksBC3(surface)

# BC3
bc4_compressed: bytes = ispc_texcomp_py.CompressBlocksBC4(surface)

# BC5
bc5_compressed: bytes = ispc_texcomp_py.CompressBLocksBC5(surface)


# compress the surface (with profile)

# BC6h
# profile options:
#   veryfast, fast, basic, slow, veryslow
profile = ispc_texcomp_py.BC6HEncSettings.from_profile("fast")
bc6h_compressed: bytes = ispc_texcomp_py.CompressBlocksBC6H(surface, profile)

# BC7
# profile options:
#   ultrafast, veryfast, fast, basic, slow,
#   alpha_ultrafast, alpha_veryfast, alpha_fast, alpha_basic, alpha_slow
profile = ispc_texcomp_py.BC7EncSettings.from_profile("fast")
bc7_compressed: bytes = ispc_texcomp_py.CompressBlocksBC7(surface, profile)

# ETC1
# profile options:
#   slow
profile = ispc_texcomp_py.ETCEncSettings.from_profile("slow")
etc1_compressed: bytes = ispc_texcomp_py.CompressBlocksETC1(surface, profile)

# ASTC
# profile options:
#   fast, alpha_fast, alpha_slow
profile = ispc_texcomp_py.ASTCEncSettings.from_profile("fas", 8, 8)
astc_compressed: bytes = ispc_texcomp_py.CompressBlocksASTC(surface, profile)

Project details


Download files

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

Source Distribution

ispc_texcomp-1.0.1.tar.gz (71.4 kB view details)

Uploaded Source

Built Distributions

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

ispc_texcomp-1.0.1-cp311-abi3-win_arm64.whl (182.9 kB view details)

Uploaded CPython 3.11+Windows ARM64

ispc_texcomp-1.0.1-cp311-abi3-win_amd64.whl (739.3 kB view details)

Uploaded CPython 3.11+Windows x86-64

ispc_texcomp-1.0.1-cp311-abi3-win32.whl (360.0 kB view details)

Uploaded CPython 3.11+Windows x86

ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ i686

ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_armv7l.whl (1.3 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARMv7l

ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (939.9 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (586.5 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ i686

ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (404.1 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

ispc_texcomp-1.0.1-cp311-abi3-macosx_11_0_arm64.whl (186.2 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

ispc_texcomp-1.0.1-cp311-abi3-macosx_10_9_x86_64.whl (708.9 kB view details)

Uploaded CPython 3.11+macOS 10.9+ x86-64

File details

Details for the file ispc_texcomp-1.0.1.tar.gz.

File metadata

  • Download URL: ispc_texcomp-1.0.1.tar.gz
  • Upload date:
  • Size: 71.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ispc_texcomp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d94b794374bde088060143976dcd9d158d66e316301d72a9f1445b6c6d6f2101
MD5 e95924f48b05a3ee7409330f55d8c8aa
BLAKE2b-256 f5957bcdf50c697780093e6fe08e32fb43c48ab9a96fd6065f2ea33efcb13f9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1.tar.gz:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 4d8510c6439bcc858c0dea013fb97528f465ccbebf76d71ccb3276a4176535ae
MD5 0c6bf421429694271d5d4b55d164a128
BLAKE2b-256 f8170520e1088ffd2c3ce90bacaddc0cb956253220f9cd938e2421bd98723f89

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-win_arm64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: ispc_texcomp-1.0.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 739.3 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 08ef519036b6229e7e207106cdc9a19101deb46cbf105ca8ec9e10d59cc69ac8
MD5 b8f0a97acf9c6372cf1f67a55d711c82
BLAKE2b-256 3435c787a609de7218eb6d1973e018d07cff650c5318bdee176a6c97547cf353

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-win_amd64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-win32.whl.

File metadata

  • Download URL: ispc_texcomp-1.0.1-cp311-abi3-win32.whl
  • Upload date:
  • Size: 360.0 kB
  • Tags: CPython 3.11+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-win32.whl
Algorithm Hash digest
SHA256 1f1acb004aeda5308487e6720ef1c0513e6a65eec1fbfcf2e7bcaf80b78345cb
MD5 06f4856f03e0bdae151cde924b8ccc7c
BLAKE2b-256 7b907c5e3aa2a5bce225d9cb12c848f4ca3bb84a94f45b83983a23ccc37ce73d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-win32.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 27b228e4db214f53a7739f8206142dc828ecd76e7504f91645896f13e64a077f
MD5 df6929f97b428997cece7429130b2050
BLAKE2b-256 5b518e41a25500b684032d17ba1b9f4cf13e3e7d05fdfc34937d811f3dcdf5a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 e04108a292094e991ab126836ee8307d92b7d4f196e126910a8e1fb9c9823646
MD5 eed7f62ca908b49d5d1fa089c342e998
BLAKE2b-256 6ce724f3b484cc4a3cf90fc79861ac0d5aa3934623ceb4851600638f10ff8085

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_i686.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 b9281e86de4c3c861a71764d4c6f3956f5b3d188d0e23cbb6e1e43abf56b7391
MD5 7dc8443928ff952923eda976c02a8b36
BLAKE2b-256 992e588fdd594b34e6b549d664174e0910c75377650326b3c2540f3dab0c2989

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_armv7l.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 29868f117de04eaeceb9b5fae1d3e6aa4896e2be75288950bb40c6b00919dc1c
MD5 f0235a8221f50d997b9fbaeaa4e90926
BLAKE2b-256 323d0456e24071d1f299cf5e1067aab40455d068f29a7be1969e61dfd686eed3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48cc5f46351b0a6e15d48b68fa9feba57d59a1396c5ed90d93df18c3d84eeca7
MD5 e5d935aa4fa5ef7450bc8f53645f887b
BLAKE2b-256 2d9456e38e19b622f9de1ece8c32f4584902cc56fe1a3e20a85bbb844cea16bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 467ac7262235db6bb97e99639ea178f0757107e77f46e62780c49f126553936a
MD5 cc3632df1a6d3007887c1d642c2b2d4d
BLAKE2b-256 d30a1703b933984192c4dbbe93a0065b379e8606e045ccf5e4e3cda69140ced4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cc293b7d83c17ddba275fd3355fa1b5ba2838e02da5fae654c8c31e0d07c8182
MD5 45cb6cc0f300b3358652ef045336b82f
BLAKE2b-256 147ca4668a7f6001df26253550c97cc1bb9c1de8925b00d15ad4c3a5e82a826e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab35d1c4b602000d15b4daacd4c7aecd71f31dd550c60500bfcb4fe5bafce9a8
MD5 f7c17d522af6b837dfe3ff449a4309ce
BLAKE2b-256 794fe3e50fe4f2d33afaa6a9fd6310fc946606f6eb9941c9e351ee8ab88b3029

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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

File details

Details for the file ispc_texcomp-1.0.1-cp311-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.1-cp311-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 129f1359ca40dfa4a781e78788033dc6b0b4fc824f12f80f9e26f38b14aa2a0c
MD5 78d944a989aebb9ecd2a401942268c16
BLAKE2b-256 23b23e9988ab1170f8bb3007e2c7fed89ee62d4be8141ad5006699a000d7d5bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.1-cp311-abi3-macosx_10_9_x86_64.whl:

Publisher: release.yml on K0lb3/ispc_texcomp_py

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 Pingdom Monitoring Sentry Error logging StatusPage Status page