first commit
This commit is contained in:
51
include/framework/picture/pict_io_codec.h
Normal file
51
include/framework/picture/pict_io_codec.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef __NPICTUREIOCODEC__
|
||||
#define __NPICTUREIOCODEC__
|
||||
|
||||
|
||||
#include "filesystem/io_handle.h"
|
||||
#include "nstring/nstring.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
class Picture;
|
||||
|
||||
/*
|
||||
@short Picture I/O codec.
|
||||
@author Emmanuel Julien (ejulien@gsworks.fr)
|
||||
*/
|
||||
struct PictureCodec
|
||||
{
|
||||
enum
|
||||
{
|
||||
NoCaps = 0,
|
||||
|
||||
CanRead = (1 << 0), ///< Codec can read data.
|
||||
CanWrite = (1 << 1), ///< Codec can write data.
|
||||
WriteRaw = (1 << 2), ///< Codec supports raw output.
|
||||
WriteLossy = (1 << 3), ///< Codec supports lossy compression.
|
||||
WriteLossless = (1 << 4), ///< Codec supports lossless compression.
|
||||
AlphaChannel = (1 << 5), ///< Codec supports alpha channel.
|
||||
RealData = (1 << 6) ///< Codec works on real data.
|
||||
};
|
||||
|
||||
virtual bool Load(IO::Handle &, Picture &) = 0;
|
||||
virtual bool Save(IO::Handle &, const Picture &) { return false; }
|
||||
|
||||
virtual const char *GetName() const = 0;
|
||||
virtual const char *GetDesc() const = 0;
|
||||
|
||||
virtual uint GetCaps() const = 0;
|
||||
|
||||
virtual ~PictureCodec() {}
|
||||
};
|
||||
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NPICTUREIOCODEC__
|
||||
Reference in New Issue
Block a user