67 static std::optional<DecodedRaster>
decode_first(
const uint8_t* data,
74 const uint8_t* data, std::size_t size);
80 static bool is_gif(
const uint8_t* data, std::size_t size);
109 static std::optional<DecodedRaster>
decode(
const uint8_t* data,
112 static bool is_tiff(
const uint8_t* data, std::size_t size);
GIF reader. Decodes GIF87a + GIF89a streams.
Definition image_codecs.hpp:62
static bool is_gif(const uint8_t *data, std::size_t size)
Quick probe — does the byte stream begin with a GIF87a/89a signature?
static std::optional< std::vector< GifFrame > > decode_all(const uint8_t *data, std::size_t size)
Decode every frame in order.
static std::optional< DecodedRaster > decode_first(const uint8_t *data, std::size_t size)
Decode just the first frame of the GIF.
GIF writer.
Definition image_codecs.hpp:88
static std::vector< uint8_t > encode_still(const DecodedRaster &raster)
Encode the raster as a standalone GIF89a file.
TIFF reader.
Definition image_codecs.hpp:107
static bool is_tiff(const uint8_t *data, std::size_t size)
static std::optional< DecodedRaster > decode(const uint8_t *data, std::size_t size)
TIFF writer.
Definition image_codecs.hpp:119
static std::vector< uint8_t > encode(const DecodedRaster &raster)
Definition affine_transform.hpp:24
A decoded raster image.
Definition image_codecs.hpp:46
std::vector< uint8_t > rgba
Tightly packed RGBA8. .size() == width * height * 4.
Definition image_codecs.hpp:50
uint32_t height
Definition image_codecs.hpp:48
uint32_t width
Definition image_codecs.hpp:47
Definition image_codecs.hpp:53
uint32_t delay_ms
Frame delay in milliseconds (the GIF spec uses centi-seconds; the codec converts so callers can hand ...
Definition image_codecs.hpp:58
DecodedRaster raster
Definition image_codecs.hpp:54