From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- source/modules/asura-core/image/image_decoder.h | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/modules/asura-core/image/image_decoder.h (limited to 'source/modules/asura-core/image/image_decoder.h') diff --git a/source/modules/asura-core/image/image_decoder.h b/source/modules/asura-core/image/image_decoder.h new file mode 100644 index 0000000..8b82d2b --- /dev/null +++ b/source/modules/asura-core/image/image_decoder.h @@ -0,0 +1,35 @@ +#ifndef __ASURA_ENGINE_IMAGE_DECODER_H__ +#define __ASURA_ENGINE_IMAGE_DECODER_H__ + +#include + +#include "image_data.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + ASURA_ABSTRACT class ImageDecoder + { + public: + + ImageDecoder() {}; + virtual ~ImageDecoder() {}; + + /// + /// 判断内存是否能用本decoder解压 + /// + virtual bool CanDecode(AEIO::DataBuffer& buffer) = 0; + + /// + /// 输入一个编码后的内存,输出一个解压后的Image data,如果解压失败返回nullptr + /// + virtual void Decode(AEIO::DataBuffer& buffer, ImageData& data) = 0; + + }; + + } +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0