Haio
0.2.X
Homebrew Asset IO/CDN
Toggle main menu visibility
Loading...
Searching...
No Matches
detect.cpp
Go to the documentation of this file.
1
#include <
haio_codec.hpp
>
2
#include <
haio_util.hpp
>
3
4
namespace
Haio::Codecs
{
5
6
/** every layer inside is a ppm, so rgba is what the encoder takes in */
7
template
<>
struct
DefaultColor
<
Format
::
ZCIS
> {
static
constexpr
Color
value
=
Color::RGBA8888
; };
8
9
/**
10
* @addtogroup detect
11
* @{
12
*/
13
/**
14
* @todo zcis has no decoder at all, so a .zcis round trip is impossible. it also
15
* cannot say which colour is inside without reading the member names.
16
*/
17
template
<>
18
bool
Detect<Format::ZCIS, Color::RGBA8888>
(
Bytes
data) {
19
return
Util::matches
(data,
"!<arch>\n"
);
20
}
21
/** @} */
22
23
}
Haio::Codecs::Detect< Format::ZCIS, Color::RGBA8888 >
bool Detect< Format::ZCIS, Color::RGBA8888 >(Bytes data)
Definition
detect.cpp:18
haio_codec.hpp
haio_util.hpp
Haio::Codecs
Definition
haio_codec.hpp:136
Haio::Codecs::DefaultColor
Definition
haio_codec.hpp:143
Haio::Util::matches
bool matches(Bytes data, Bytes magic)
Definition
matches.cpp:7
Haio::Color
Color
Definition
haio_formats.hpp:106
Haio::Color::RGBA8888
@ RGBA8888
Definition
haio_formats.hpp:107
Haio::Format
Format
Definition
haio_formats.hpp:17
Haio::Format::ZCIS
@ ZCIS
Definition
haio_formats.hpp:59
Haio::Bytes
std::span< const uint8_t > Bytes
Definition
haio_codec.hpp:14
Haio::Codecs::DefaultColor< Format::ZCIS >::value
static constexpr Color value
Definition
detect.cpp:7
library
backend
codecs
container
zcis
detect.cpp
Generated by
1.18.0