Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

plsgidec.h

00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plsgidec.h,v 1.1 2003/06/01 21:12:06 uzadow Exp $
00005 |
00006 |      Copyright (c) 1996-2002 Ulrich von Zadow
00007 |
00008 \--------------------------------------------------------------------
00009 */
00010 
00011 #ifndef INCL_PLSGIDEC
00012 #define INCL_PLSGIDEC
00013 
00014 #ifndef INCL_PLPICDEC
00015 #include "plpicdec.h"
00016 #endif
00017 
00018 //! SGI rgb file decoder. 
00019 class PLSGIDecoder : public PLPicDecoder
00020 {
00021   typedef struct {
00022     PLWORD  Magic;
00023     PLBYTE  Storage;
00024     PLBYTE  bpc;              // bytes per color: 1 = bytes, 2 = shorts
00025     PLWORD  Dimension;        // 1 = single row, 2 = B/W, 3 = RGB
00026     PLWORD  XSize;            // width in pixels
00027     PLWORD  YSize;            // height in pixels
00028     PLWORD  ZSize;            // # of channels; GRAY=1, RGB=3, RGBA=4
00029     PLULONG PixMin, PixMax;   // min/max pixel values
00030     PLULONG Dummy1;
00031     char    Name[80];
00032     PLULONG Colormap;
00033   } SGIHeader;
00034 
00035 public:
00036   //! Creates a decoder
00037   PLSGIDecoder
00038     ();
00039 
00040   //! Destroys a decoder
00041   virtual ~PLSGIDecoder
00042     ();
00043 
00044    //!
00045   virtual void Open (PLDataSource * pDataSrc);
00046 
00047   //! Fills the bitmap with the image. 
00048   virtual void GetImage (PLBmp & Bmp);
00049 
00050 private:
00051   void readHeader
00052     ( SGIHeader * pHeader,
00053       PLDataSource * pDataSrc
00054     );
00055 
00056   SGIHeader m_Header;
00057 };
00058 
00059 #endif
00060 /*
00061 /--------------------------------------------------------------------
00062 |
00063 |      $Log: plsgidec.h,v $
00064 |      Revision 1.1  2003/06/01 21:12:06  uzadow
00065 |      Added sgi rgb file format.
00066 |
00067 |
00068 |
00069 \--------------------------------------------------------------------
00070 */

Generated on Sun Jun 6 13:42:22 2004 for paintlib by doxygen 1.3.2