class
#include <Magnum/PixelStorage.h>
CompressedPixelStorage Compressed pixel storage parameters.
Descibes how to interpret data which are read from or stored into CompressedImage, CompressedImageView, Trade::
Includes all parameters from PixelStorage, except for alignment(), which is ignored for compressed images.
Base classes
- class PixelStorage
- Pixel storage parameters.
Constructors, destructors, conversion operators
- CompressedPixelStorage() constexpr noexcept
- Default constructor.
Public functions
- auto operator==(const CompressedPixelStorage& other) const -> bool
- Equality comparison.
- auto operator!=(const CompressedPixelStorage& other) const -> bool
- Non-equality comparison.
- auto compressedBlockSize() const -> Vector3i constexpr
- Compressed block size.
- auto setCompressedBlockSize(const Vector3i& size) -> CompressedPixelStorage&
- Set compressed block size.
- auto compressedBlockDataSize() const -> Int constexpr
- Compressed block data size (in bytes)
- auto setCompressedBlockDataSize(Int size) -> CompressedPixelStorage&
- Set compressed block data size (in bytes)
-
auto dataProperties(const Vector3i& size) const -> std::
pair<Math:: Vector3<std:: size_t>, Math:: Vector3<std:: size_t>> - Data properties for given parameters.
Function documentation
Magnum:: CompressedPixelStorage:: CompressedPixelStorage() constexpr noexcept
Default constructor.
Sets all parameters to default values, i.e. all values set to false
/ 0
except for alignment, which is 4
.
CompressedPixelStorage& Magnum:: CompressedPixelStorage:: setCompressedBlockSize(const Vector3i& size)
Set compressed block size.
If set to 0
for given dimension, size information from particular compressed format is used. Default is 0
in all dimensions.
CompressedPixelStorage& Magnum:: CompressedPixelStorage:: setCompressedBlockDataSize(Int size)
Set compressed block data size (in bytes)
If set to 0
, size information from particular compressed format is used. Default is 0
in all dimensions.
std:: pair<Math:: Vector3<std:: size_t>, Math:: Vector3<std:: size_t>> Magnum:: CompressedPixelStorage:: dataProperties(const Vector3i& size) const
Data properties for given parameters.
Returns byte offset in each dimension, count of blocks in each dimension and block data size for image of given size
with current pixel storage parameters. Adding byte offset and product of the vector multiplied with block data size gives minimal byte count to store given data.
Expects compressedBlockSize() and compressedBlockDataSize() to be non-zero.