cesium-native
0.41.0
|
Contains methods for reading and manipulating images. More...
#include <CesiumGltfReader/ImageDecoder.h>
Static Public Member Functions | |
static ImageReaderResult | readImage (const gsl::span< const std::byte > &data, const CesiumGltf::Ktx2TranscodeTargets &ktx2TranscodeTargets) |
Reads an image from a buffer. More... | |
static std::optional< std::string > | generateMipMaps (CesiumGltf::ImageAsset &image) |
Generate mipmaps for this image. More... | |
Contains methods for reading and manipulating images.
Definition at line 42 of file ImageDecoder.h.
|
static |
Generate mipmaps for this image.
Does nothing if mipmaps already exist or the compressedPixelFormat is not GpuCompressedPixelFormat::NONE.
image | The image to generate mipmaps for. * |
|
static |
Reads an image from a buffer.
The stb_image library is used to decode images in JPG
, PNG
, TGA
, BMP
, PSD
, GIF
, HDR
, or PIC
format.
data | The buffer from which to read the image. |
ktx2TranscodeTargetFormat | The compression format to transcode KTX v2 textures into. If this is std::nullopt, KTX v2 textures will be fully decompressed into raw pixels. |