33 lines
921 B
C++
33 lines
921 B
C++
//
|
|
// Created by sfd on 25-8-5.
|
|
//
|
|
|
|
#ifndef IMAGEREADER_H
|
|
#define IMAGEREADER_H
|
|
#include "BinaryOPT/BinaryReader.h"
|
|
#include "Tex/TexImageContainer.h"
|
|
|
|
namespace PKG
|
|
{
|
|
class PKG_API ImageReader
|
|
{
|
|
public:
|
|
static TexImage ReadFrom(BinaryReader& reader, const TexImageContainer& container, TexFormat format);
|
|
|
|
static TexImageContainer ImageContainerReaderReadFrom(BinaryReader& reader, TexFormat texFormat);
|
|
|
|
private:
|
|
static TexMipMap ReadMipMapV1(BinaryReader& reader);
|
|
static TexMipMap ReadMipMapV2AndV3(BinaryReader& reader);
|
|
static TexMipMap ReadMipMapV4(BinaryReader& reader);
|
|
|
|
static std::vector<uint8_t> ReadBytes(BinaryReader& reader);
|
|
|
|
static MipmapFormat GetFormatFromTex(FreeImageFormat imageFormat, TexFormat format);
|
|
static MipmapFormat FreeImageFormatToMipmapFormat(FreeImageFormat imageFormat);
|
|
};
|
|
}
|
|
|
|
|
|
#endif //IMAGEREADER_H
|