This is a library to encode images as ASTC for use on a GPU with hardware compression support.
It is implemented as bindings to ARM's official
In order to use the images generated by this library directly on the GPU, you need ensure that
the GPU you're running on has support for ASTC, which can be queried with the Vulkan
textureCompressionASTC_* flags (one flag for each of the modes in
Configuration for initializing
Builder for the context configuration.
The core context. All configuration should be done through this.
A 3-dimensional set of width, height and depth. ASTC supports 3D images, so we always have to specify the depth of an image.
Configuration flags for the context.
The 3D image type. Each pixel should be RGBA. The data can be anything that dereferences to a
flat array of color components, as long as the color components are in one of the supported
formats. For HDR images,
A component selection swizzle. The image must always be in RGBA order, even if the G, B and/or A components are never used.
An error during initialization, compression or decompression.
The performance preset, higher settings take more time but provide higher quality. It will not provide better compression at higher settings, compression is decided only by the block size.
The color profile. HDR and LDR SRGB require the image to use floats for its individual colors.
An individual component of a swizzle.
Which of the supported subpixel types the image data's subpixels should be interpreted as. Floating-point types must be used for HDR data.
A valid type for a subpixel.