Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __IIMAGE_H__
00017 #define __IIMAGE_H__
00018
00019 #include "imagen.h"
00020
00021 #include "iAbstractImage.h"
00022
00023 namespace imagen
00024 {
00026
00035 class iImage : public iAbstractImage
00036 {
00037 public:
00039 iImage();
00040
00042
00043 iImage( const iImage &img );
00044
00046 iImage( const iAbstractImage &img );
00047
00049
00053 iImage( int w, int h, iImageFormat f );
00054
00056
00058 iImage( Iubyte *d, int w, int h, iImageFormat f, int b );
00059
00061
00062 iImage( const char *filename );
00063
00065
00066 iImage( const char *filename, iImageType tp );
00067
00069
00070 iImage( Iubyte *buf, int len );
00071
00073
00074 iImage( Iubyte *buf, int len, iImageType tp );
00075
00077
00078 iImage( iDataStream *s );
00079
00081
00082 iImage( iDataStream *s, iImageType tp );
00083
00085 ~iImage();
00086
00088
00094 bool load( const char *filename );
00095
00097
00104 bool load( const char *filename, iImageType tp );
00105
00107
00113 bool load( Iubyte *buf, int len );
00114
00116
00122 bool load( Iubyte *buf, int len, iImageType tp );
00123
00125
00128 bool load( iDataStream *s );
00129
00131
00134 bool load( iDataStream *s, iImageType tp );
00135
00137
00142 bool save( const char *filename );
00143
00145
00148 bool save( const char *filename, iImageType tp );
00149
00151
00157 bool save( Iubyte *buf, int len );
00158
00160
00164 bool save( Iubyte *buf, int len, iImageType tp );
00165
00167
00170 bool save( iDataStream *s );
00171
00173
00176 bool save( iDataStream *s, iImageType tp );
00177
00178 void clear();
00179
00180 bool isFormatSupported( iImageFormat fmt ) const { return false; }
00181
00182 iImage &operator=( const iAbstractImage &img );
00183
00184 protected:
00185 void init();
00186 bool loadImage();
00187 bool saveImage();
00188
00189 private:
00190 iImageType determineType( const char *ext );
00191 };
00192 }
00193
00194 #endif // __IIMAGE_H__