Skip to main content

Python bindings for ISPCTextureCompressor

Project description

ispc_texcomp_py

Python bindings for ISPCTextureCompressor

Installation

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(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(profile="fast")
bc7_compressed: bytes = ispc_texcomp_py.CompressBlocksBC7(surface, profile)

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

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

detailed profile settings

TODO

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.0.tar.gz (66.0 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.0-cp311-abi3-win_arm64.whl (179.0 kB view details)

Uploaded CPython 3.11+Windows ARM64

ispc_texcomp-1.0.0-cp311-abi3-win_amd64.whl (204.8 kB view details)

Uploaded CPython 3.11+Windows x86-64

ispc_texcomp-1.0.0-cp311-abi3-win32.whl (355.8 kB view details)

Uploaded CPython 3.11+Windows x86

ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl (1.4 MB view details)

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

ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_i686.whl (1.6 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ i686

ispc_texcomp-1.0.0-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.0-cp311-abi3-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (926.0 kB view details)

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

ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (388.5 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (569.3 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

ispc_texcomp-1.0.0-cp311-abi3-macosx_11_0_arm64.whl (181.5 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

ispc_texcomp-1.0.0-cp311-abi3-macosx_10_9_x86_64.whl (198.9 kB view details)

Uploaded CPython 3.11+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: ispc_texcomp-1.0.0.tar.gz
  • Upload date:
  • Size: 66.0 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.0.tar.gz
Algorithm Hash digest
SHA256 a76eb902642c5741a254b88c8b7ee944319fa7373343db05150d8840ee4ba31a
MD5 b0ea811dadbb1300c49409dc869bb549
BLAKE2b-256 0dd5cb61a319e85ba07c28c9e58b7cbafc0fa7d935e072681b45c3c0ca8b3ac2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0.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.0-cp311-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 40f6d87db2db4d7af4daea9a06608a35b9a0443d78ce05aa646d32eb65bed6c7
MD5 2ae5dbc3e2a22aad25b4dba1d2780d70
BLAKE2b-256 0a3672217e389db7669672e3818305686528fadd95a4b33f558849f015327b6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: ispc_texcomp-1.0.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 204.8 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.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e7a338723cdf51f7fc78e45ac543147e25a13c03067ca3624f24a16c11b295b
MD5 cc6f9606a3b66747f0b4f9705ed7fcdb
BLAKE2b-256 aa2b012802ea19448a06d0298c69f484b5237f73990b07eaf897018b9c14cc29

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-win32.whl.

File metadata

  • Download URL: ispc_texcomp-1.0.0-cp311-abi3-win32.whl
  • Upload date:
  • Size: 355.8 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.0-cp311-abi3-win32.whl
Algorithm Hash digest
SHA256 31d60c4977d6b2df187e08a8e9355b799b51fd0c0952d110d2fd86a836f655cd
MD5 f8aeb9ee5a06669417ffd85c05f10f0f
BLAKE2b-256 0a8cbf5e4598cc3e7f107e8ebe1f3c77169302e47b3b02f840f93d0fc59afd3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 412fed49c932aee3b37f3360e63cc44bf693e0d87cc70a11d2d44a34f0624c45
MD5 f453c1df0f02cf53855525bdab965ccd
BLAKE2b-256 73245f97e3b16d62f6c85a0c618e29a51d5b5dde37e55500ca5611e830c3a811

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5f2e0dd3281eaa6232196e12ffa60b9244c399593578a063cbaac06363800327
MD5 1595299b8a77141ac2a2eba31e94f943
BLAKE2b-256 c88c3d172e84a9d02c8dadc15a5ed3a933baa73c9e6190d5100b2d9904cd32e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 8274c3fe8296250aafeaeb983721cb6bd3d2810afe5cb04dcf2cbb6ffc41676c
MD5 a963bda9a02433e74739f5ffcc9d0148
BLAKE2b-256 075c36561136784b46827a186378d168764c0ec0674d221b3039e41ce1f06461

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 baba7a99f252fc449364cb54eff7de1ad5cdbcd27424270ab3806b9e3940713f
MD5 a3bfc12e6a8dde3951a1750ebb23ae4e
BLAKE2b-256 119561330666a27606e6ae7c3d5e93768ce9a210a55ebfe468d953eca1c9b41d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3ca05bd2981d753d4f63d026d9d4a9a0debac14cc40112eaf9fa11a03457637
MD5 49751044464cd0c6ec202882174e1ce2
BLAKE2b-256 24b775d2ce258af4ede1f300e4b24c5f5db7b09791d2ddd746e751d958c21119

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 23f093088ef734e731d7c594dbd3884e6585f43ede31129dc4abbe07fbfa1740
MD5 4fedd4e1be797a71a5c9d05a0294481a
BLAKE2b-256 09414d9d216257e89c59691a137158bcdf234fae33880930bd0f7e88d0ac0e3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 dd27cbf203f93dde0a64a032b84131aa3754712a8be65b7882a8392a10204f68
MD5 e2d09bd6498d4923477e764b0b190029
BLAKE2b-256 86dee01c1fc49b8c569fa001d83af012c6513d56bd7c257f93b89a918a493857

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.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.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1528151424199a4812f0e7bc7f539b5cdbba08cb9ca5f9678c826650cffacb8c
MD5 70e7d6340c154606d195145404cb924a
BLAKE2b-256 d3463bdac03e31fed4ccc9e70223b52da05456cb9828c83b35393157f36cda9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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.0-cp311-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ispc_texcomp-1.0.0-cp311-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 718cbb920b543fdaa6e15465db0fcea9daae515fa778ad5bb0354affd86ac631
MD5 137f379e069106327fe4dcfa2c99271b
BLAKE2b-256 f28ca86de43637ce605518b75f97f18c807342ac741cae81e91837d201b7b3a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ispc_texcomp-1.0.0-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