// @(#)root/graf:$Id$
// Author: Valeriy Onuchin   23/06/05

/*************************************************************************
 * Copyright (C) 2001-2002, Rene Brun, Fons Rademakers and Reiner Rohlfs *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TImagePlugin
#define ROOT_TImagePlugin


//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TImagePlugin                                                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TString
#include "TString.h"
#endif


class TImagePlugin : public TObject {

protected:
   TString fExtension;  // file extension

public:
   TImagePlugin(const char *ext) { fExtension = ext; }
   virtual ~TImagePlugin() { }

   virtual unsigned char *ReadFile(const char *filename, UInt_t &w,  UInt_t &h) = 0;
   virtual Bool_t WriteFile(const char *filename, unsigned char *argb, UInt_t w,  UInt_t  h) = 0;
   ULong_t Hash() const { return fExtension.Hash(); }

   ClassDef(TImagePlugin, 0)  // base class for different image format handlers(plugins)
};

#endif
 TImagePlugin.h:1
 TImagePlugin.h:2
 TImagePlugin.h:3
 TImagePlugin.h:4
 TImagePlugin.h:5
 TImagePlugin.h:6
 TImagePlugin.h:7
 TImagePlugin.h:8
 TImagePlugin.h:9
 TImagePlugin.h:10
 TImagePlugin.h:11
 TImagePlugin.h:12
 TImagePlugin.h:13
 TImagePlugin.h:14
 TImagePlugin.h:15
 TImagePlugin.h:16
 TImagePlugin.h:17
 TImagePlugin.h:18
 TImagePlugin.h:19
 TImagePlugin.h:20
 TImagePlugin.h:21
 TImagePlugin.h:22
 TImagePlugin.h:23
 TImagePlugin.h:24
 TImagePlugin.h:25
 TImagePlugin.h:26
 TImagePlugin.h:27
 TImagePlugin.h:28
 TImagePlugin.h:29
 TImagePlugin.h:30
 TImagePlugin.h:31
 TImagePlugin.h:32
 TImagePlugin.h:33
 TImagePlugin.h:34
 TImagePlugin.h:35
 TImagePlugin.h:36
 TImagePlugin.h:37
 TImagePlugin.h:38
 TImagePlugin.h:39
 TImagePlugin.h:40
 TImagePlugin.h:41
 TImagePlugin.h:42
 TImagePlugin.h:43
 TImagePlugin.h:44
 TImagePlugin.h:45
 TImagePlugin.h:46
 TImagePlugin.h:47