Fixed all errors.

This commit is contained in:
2023-12-18 02:13:20 -08:00
parent 3acb78f247
commit 0a6f5533ee
37 changed files with 950 additions and 1090 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "EHS.h"
#include "Types.h"
#include "BaseObj.h"
#include "Str.h"
#include "ImgCodec.h"
@@ -12,12 +13,14 @@ namespace ehs
NEAREST_NEIGHBOR
};
class Img
class Img : public BaseObj
{
private:
static Array<ImgCodec> codecs;
protected:
UInt_64 hashId;
Str_8 id;
UInt_8 bitDepth;
UInt_8 channels;
UInt_64 width;
@@ -40,9 +43,11 @@ namespace ehs
Img();
Img(UInt_8 bitDepth, UInt_8 channels, UInt_64 width, UInt_64 height, const Byte* data);
Img(Str_8 id);
Img(UInt_8 bitDepth, UInt_8 channels, UInt_64 width, UInt_64 height);
Img(Str_8 id, UInt_8 bitDepth, UInt_8 channels, UInt_64 width, UInt_64 height, const Byte* data);
Img(Str_8 id, UInt_8 bitDepth, UInt_8 channels, UInt_64 width, UInt_64 height);
Img(Img&& img) noexcept;
@@ -58,6 +63,12 @@ namespace ehs
void Release();
UInt_64 GetHashId() const;
void SetId(Str_8 newId);
Str_8 GetId() const;
UInt_8 BitDepth() const;
UInt_8 Channels() const;
@@ -120,7 +131,7 @@ namespace ehs
static Img* FromFile_Heap(const Str_8& filePath);
static Img FromData(const Str_8& ext, Serializer<UInt_64>& data);
static Img FromData(Str_8 id, const Str_8& ext, Serializer<UInt_64>& data);
private:
Img GetNearestNeighbor(UInt_64 newWidth, UInt_64 newHeight) const;