31 static bool HasCodec(UInt_64 hashExt);
33 static bool HasCodec(
const Str_8& ext);
35 static bool AddCodec(
ImgCodec codec);
37 static const ImgCodec* GetCodec(UInt_64 hashExt);
55 Img& operator=(
Img&& img)
noexcept;
57 Img& operator=(
const Img& img);
59 operator const Byte* ()
const;
65 UInt_64 GetHashId()
const;
67 void SetId(
Str_8 newId);
71 UInt_8 GetByteDepth()
const;
73 UInt_8 GetBitDepth()
const;
75 UInt_8 GetChannels()
const;
79 UInt_64 GetSize()
const;
81 void SetPixel(UInt_64 index,
const Byte* pixel);
83 void GetPixel(UInt_64 index,
Byte* pixel)
const;
85 void SetPixel(UInt_64 x, UInt_64 y,
const Byte* pixel);
87 void GetPixel(UInt_64 x, UInt_64 y,
Byte* pixel)
const;
95 Img GetAsRGBA()
const;
103 Img GetAsMonoA()
const;
107 Img GetAsMono()
const;
125 bool IsValid()
const;
127 bool Export(
const Str_8& filePath)
const;
130 Img GetNearestNeighbor(
const Vec2_u64& newResolution)
const;
132 void NearestNeighbor(
const Vec2_u64& newResolution);
134 void RGB_To_RGBA(UInt_64 newSize,
Byte* buffer)
const;
136 void MonoA_To_RGBA(UInt_64 newSize,
Byte* buffer)
const;
138 void Mono_To_RGBA(UInt_64 newSize,
Byte* buffer)
const;
140 void RGBA_To_RGB(UInt_64 newSize,
Byte* buffer)
const;
142 void MonoA_To_RGB(UInt_64 newSize,
Byte* buffer)
const;
144 void Mono_To_RGB(UInt_64 newSize,
Byte* buffer)
const;
146 void RGBA_To_MonoA(UInt_64 newSize,
Byte* buffer)
const;
148 void RGB_To_MonoA(UInt_64 newSize,
Byte* buffer)
const;
150 void Mono_To_MonoA(UInt_64 newSize,
Byte* buffer)
const;
152 void RGBA_To_Mono(UInt_64 newSize,
Byte* buffer)
const;
154 void RGB_To_Mono(UInt_64 newSize,
Byte* buffer)
const;
156 void MonoA_To_Mono(UInt_64 newSize,
Byte* buffer)
const;
158 void BD24_to_BD32(UInt_64 newSize,
Byte* buffer)
const;
160 void BD16_to_BD32(UInt_64 newSize,
Byte* buffer)
const;
162 void BD8_to_BD32(UInt_64 newSize,
Byte* buffer)
const;
164 void BD32_to_BD24(UInt_64 newSize,
Byte* buffer)
const;
166 void BD16_to_BD24(UInt_64 newSize,
Byte* buffer)
const;
168 void BD8_to_BD24(UInt_64 newSize,
Byte* buffer)
const;
170 void BD32_to_BD16(UInt_64 newSize,
Byte* buffer)
const;
172 void BD24_to_BD16(UInt_64 newSize,
Byte* buffer)
const;
174 void BD8_to_BD16(UInt_64 newSize,
Byte* buffer)
const;
176 void BD32_to_BD8(UInt_64 newSize,
Byte* buffer)
const;
178 void BD24_to_BD8(UInt_64 newSize,
Byte* buffer)
const;
180 void BD16_to_BD8(UInt_64 newSize,
Byte* buffer)
const;
Definition: ImgCodec.h:16
Byte * data
Definition: Img.h:28
Str_8 id
Definition: Img.h:23
Vec2_u64 resolution
Definition: Img.h:26
UInt_8 byteDepth
Definition: Img.h:24
UInt_64 hashId
Definition: Img.h:22
UInt_8 channels
Definition: Img.h:25
UInt_64 size
Definition: Img.h:27
Definition: Serializer.h:25
unsigned char UInt_8
Definition: Types.h:43
bool DecodePNG(const ehs::ImgCodec *codec, ehs::Serializer< ehs::UInt_64 > &in, ehs::Img *out)
Definition: Img.cpp:1642
bool DecodeQOI(const ehs::ImgCodec *codec, ehs::Serializer< ehs::UInt_64 > &in, ehs::Img *out)
Definition: Img.cpp:1558
Resampling
Definition: Img.h:11
unsigned char Byte
Definition: Types.h:39
bool EncodeQOI(const ehs::ImgCodec *codec, ehs::Serializer< ehs::UInt_64 > &out, const ehs::Img *in)
Definition: Img.cpp:1440