1 #ifndef __mem_image_h
2 #define __mem_image_h
3 
4 #ifndef __gif_image_h
5 #	include "gif_image.H"
6 #endif
7 
8 class MemImage : public GifImage {
9 	public:
10 		MemImage( const char *filename );
11 		// MemImage() : GifImage()				{}
~MemImage()12 		~MemImage()								{}
13 
Cols()14 		int	Cols()							{ return width/pic_width; }
Rows()15 		int	Rows()							{ return height/pic_height; }
PicWidth()16 		int	PicWidth()						{ return pic_width; }
PicHeight()17 		int	PicHeight()						{ return pic_height; }
PicNum()18 		int	PicNum()							{ return Cols()*Rows(); }
19 
SubImage(int x,int y)20 		const byte *SubImage(int x,int y) {
21 			return Data() + PicHeight()*width *y + PicWidth()*x;
22 		}
SubImage(int id)23 		const byte *SubImage(int id) {
24 			return SubImage(id%Cols(),id/Cols());
25 		}
26 
27 		void SetupParams( struct parameter *par, int w, int h );
28 		void ShowInfoMsg();
29 
30 	private:
31 		int	pic_width, pic_height;
32 };
33 
34 #endif
35