载入中...
搜索中...
未找到
SourceTga.h
浏览该文件的文档.
1#pragma once
2#include <cstdint>
3#include <span>
4#include <vector>
5#include "common/Export.h"
6#include "common/Result.h"
7
8namespace eve::asset::detail {
10struct TgaPixels {
11 std::uint32_t width = 0, height = 0;
12 std::vector<std::uint8_t> rgba;
13};
20[[nodiscard]] EVENGINE_API_FOUNDATION Result<TgaPixels> decodeTgaRgba8(std::span<const std::uint8_t> bytes,
21 std::uint64_t maximumDecodedBytes);
22} // namespace eve::asset::detail
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::uint64_t bytes
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Result< TgaPixels > decodeTgaRgba8(std::span< const std::uint8_t > b, std::uint64_t budget)
Decode true-color 24/32-bit raw or RLE TGA with bounded allocation.
Definition SourceTga.cpp:7
Owning top-down RGBA8 pixels decoded from a TGA source.
Definition SourceTga.h:10
std::vector< std::uint8_t > rgba
Definition SourceTga.h:12