3#include "CesiumGltf/ImageAsset.h"
4#include "CesiumGltfReader/Library.h"
6#include <CesiumUtility/IntrusivePointer.h>
56 const std::span<const std::byte>& data,
68 static std::optional<std::string>
88 const std::byte* pInputPixels,
91 int32_t inputStrideBytes,
92 std::byte* pOutputPixels,
95 int32_t outputStrideBytes,
Contains methods for reading and manipulating images.
static bool unsafeResize(const std::byte *pInputPixels, int32_t inputWidth, int32_t inputHeight, int32_t inputStrideBytes, std::byte *pOutputPixels, int32_t outputWidth, int32_t outputHeight, int32_t outputStrideBytes, int32_t channels)
Resize an image, without validating the provided pointers or ranges.
static ImageReaderResult readImage(const std::span< const std::byte > &data, const CesiumGltf::Ktx2TranscodeTargets &ktx2TranscodeTargets)
Reads an image from a buffer.
static std::optional< std::string > generateMipMaps(CesiumGltf::ImageAsset &image)
Generate mipmaps for this image.
A smart pointer that calls addReference and releaseReference on the controlled object.
Classes for reading glTF models.
The result of reading an image with ImageDecoder::readImage.
std::vector< std::string > errors
Error messages that occurred while trying to read the image.
CesiumUtility::IntrusivePointer< CesiumGltf::ImageAsset > pImage
The CesiumGltf::ImageAsset that was read.
std::vector< std::string > warnings
Warning messages that occurred while reading the image.
A 2D image asset, including its pixel data. The image may have mipmaps, and it may be encoded in a GP...
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...