Topaz 5.0
Topaz Game Engine
|
High-level library for wrangling files of various formats.
This library contains support for a handful of common file formats, allowing you to import them without having to implement a parser yourself.
Classes | |
struct | tz::io::image_header |
Describes basic information about an image. More... | |
std::expected< image_header, tz::error_code > tz::io::image_info | ( | std::span< const std::byte > | img_file_data | ) |
Retrieve info about an image loaded in memory.
img_file_data | Data read directly from an image file. See below for the list of supported image file formats. |
The image file formats guaranteed are:
Other file formats that aren't listed here might still work, but you should consider anything not on this list an implementation detail that could lose support suddenly in a new release.
tz::error_code tz::io::parse_image | ( | std::span< const std::byte > | img_file_data, |
std::span< std::byte > | buffer ) |
Load an image from file data resident in memory.
img_file_data | Data read directly from an image file. See the detailsof image_info for a list of supported image file formats. |
buffer | A buffer of memory into which decoded image data will be written. It is your responsibility to provide a buffer that is of sufficient size. To decipher the size needed, see image_info. |