diff options
Diffstat (limited to 'TextureLoader/interface/Image.h')
| -rw-r--r-- | TextureLoader/interface/Image.h | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/TextureLoader/interface/Image.h b/TextureLoader/interface/Image.h index 5b9860e..a970d77 100644 --- a/TextureLoader/interface/Image.h +++ b/TextureLoader/interface/Image.h @@ -47,7 +47,13 @@ enum class EImageFileFormat png, /// The image is encoded in TIFF format - tiff + tiff, + + /// DDS file + dds, + + /// KTX file + ktx }; /// Image loading information @@ -106,30 +112,32 @@ public: static void Encode(const EncodeInfo& Info, IDataBlob** ppEncodedData); /// Returns image description - const ImageDesc &GetDesc(){ return m_Desc; } + const ImageDesc& GetDesc(){ return m_Desc; } /// Returns a pointer to the image data - IDataBlob *GetData(){ return m_pData; } + IDataBlob* GetData(){ return m_pData; } static std::vector<Uint8> ConvertImageData(Uint32 Width, - Uint32 Height, - const Uint8* pData, - Uint32 Stride, - TEXTURE_FORMAT SrcFormat, - TEXTURE_FORMAT DstFormat, - bool KeepAlpha); + Uint32 Height, + const Uint8* pData, + Uint32 Stride, + TEXTURE_FORMAT SrcFormat, + TEXTURE_FORMAT DstFormat, + bool KeepAlpha); + + static EImageFileFormat GetFileFormat(const Uint8* pData, size_t Size); private: template<typename AllocatorType, typename ObjectType> friend class MakeNewRCObj; - Image(IReferenceCounters *pRefCounters, - IDataBlob *pFileData, - const ImageLoadInfo& LoadInfo); + Image(IReferenceCounters* pRefCounters, + IDataBlob* pFileData, + const ImageLoadInfo& LoadInfo); - void LoadPngFile( IDataBlob *pFileData, const ImageLoadInfo& LoadInfo ); - void LoadTiffFile( IDataBlob *pFileData,const ImageLoadInfo& LoadInfo ); - void LoadJpegFile( IDataBlob *pFileData,const ImageLoadInfo& LoadInfo ); + void LoadPngFile( IDataBlob* pFileData, const ImageLoadInfo& LoadInfo ); + void LoadTiffFile( IDataBlob* pFileData, const ImageLoadInfo& LoadInfo ); + void LoadJpegFile( IDataBlob* pFileData, const ImageLoadInfo& LoadInfo ); ImageDesc m_Desc; RefCntAutoPtr<IDataBlob> m_pData; |
