//---------------------------------------------------------------------------
#ifndef gifimageH
#define gifimageH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>

#include "gifdecod.h"
#include "gifencod.h"

//---------------------------------------------------------------------------
class PACKAGE TGifImage : public TGraphic
{
private:
  BitmapImage image ;
  GifDecoder decoder ;
  GifEncoder encoder ;
  
  Graphics::TBitmap *bitmap ;

protected:

public:
    virtual __fastcall TGifImage();
    virtual __fastcall ~TGifImage();
    virtual void __fastcall Draw (TCanvas *canvas, const TRect &rect) ;
    virtual bool __fastcall GetEmpty () ;
    virtual int __fastcall GetHeight () ;
    virtual int __fastcall GetWidth () ;
    virtual void __fastcall  SetHeight (int) ;
    virtual void __fastcall  SetWidth (int) ;
    virtual void __fastcall LoadFromStream (TStream *) ;
    virtual void __fastcall SaveToStream (TStream *) ;
    virtual void __fastcall LoadFromClipboardFormat (Word, int, HPALETTE) ;
    virtual void __fastcall SaveToClipboardFormat (Word &, int &, HPALETTE &) ;
    virtual void __fastcall SetPalette (HPALETTE) ;
    virtual void __fastcall Assign (TPersistent *source) ;
    virtual void __fastcall AssignTo (TPersistent *dest) ;
    virtual HPALETTE __fastcall GetPalette () ;

__published:
};
//---------------------------------------------------------------------------
#endif
