Changed up how resources import/export files. Added Model codecs.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace ehs
|
||||
|
||||
Img();
|
||||
|
||||
Img(Str_8 id);
|
||||
Img(const Str_8& filePath);
|
||||
|
||||
Img(Str_8 id, UInt_8 byteDepth, UInt_8 channels, const Vec2_u64& resolution, const Byte* data);
|
||||
|
||||
@@ -124,13 +124,7 @@ namespace ehs
|
||||
|
||||
bool IsValid() const;
|
||||
|
||||
bool ToFile(const Str_8& filePath) const;
|
||||
|
||||
static Img FromFile(const Str_8& filePath);
|
||||
|
||||
static Img* FromFile_Heap(const Str_8& filePath);
|
||||
|
||||
static Img FromData(Str_8 id, const Str_8& ext, Serializer<UInt_64>& data);
|
||||
bool Export(const Str_8& filePath) const;
|
||||
|
||||
private:
|
||||
Img GetNearestNeighbor(const Vec2_u64& newResolution) const;
|
||||
@@ -185,4 +179,10 @@ namespace ehs
|
||||
|
||||
void BD16_to_BD8(UInt_64 newSize, Byte* buffer) const;
|
||||
};
|
||||
|
||||
bool EncodeQOI(const ehs::ImgCodec* codec, ehs::Serializer<ehs::UInt_64>& out, const ehs::Img* in);
|
||||
|
||||
bool DecodeQOI(const ehs::ImgCodec* codec, ehs::Serializer<ehs::UInt_64>& in, ehs::Img* out);
|
||||
|
||||
bool DecodePNG(const ehs::ImgCodec* codec, ehs::Serializer<ehs::UInt_64>& in, ehs::Img* out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user