/[projet1]/public/pc/tools/osdk/main/pictconv/sources/image.h
Defence Force logotype

Diff of /public/pc/tools/osdk/main/pictconv/sources/image.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1259 by dbug, Mon Sep 20 18:59:17 2010 UTC revision 1260 by dbug, Sat Feb 14 20:26:49 2015 UTC
# Line 13  class AtariClut; Line 13  class AtariClut;
13  class ImageContainer  class ImageContainer
14  {  {
15  public:  public:
16          ImageContainer();    ImageContainer();
17          ImageContainer(const ImageContainer& otherImage);    ImageContainer(const ImageContainer& otherImage);
18          ~ImageContainer();    virtual ~ImageContainer();
19    
20          void Clear();    void Clear();
21          bool Allocate(unsigned int width,unsigned int height,unsigned int bpp);    bool Allocate(unsigned int width,unsigned int height,unsigned int bpp);
22    
23          FIBITMAP* GetBitmap()    FIBITMAP* GetBitmap()
24          {    {
25                  return m_pBitmap;      return m_pBitmap;
26          }    }
27    
28          unsigned int GetWidth() const;    unsigned int GetWidth() const;
29          unsigned int GetHeight() const;    unsigned int GetHeight() const;
30          unsigned int GetDpp() const;    unsigned int GetDpp() const;
31          unsigned int GetPaletteSize() const;    unsigned int GetPaletteSize() const;
32    
33          bool LoadPicture(const std::string& fileName);    bool LoadPicture(const std::string& fileName);
34          bool SavePicture(const std::string& fileName) const;    bool SavePicture(const std::string& fileName) const;
35    
36          void WriteColor(const RgbColor& rgb,int x,int y);    void WriteColor(const RgbColor& rgb,int x,int y);
37          RgbColor ReadColor(int x,int y) const;    RgbColor ReadColor(int x,int y) const;
38    
39          // Painting functions    // Painting functions
40          void FillRectangle(const RgbColor& rgb,unsigned int x0,unsigned int y0,unsigned int width,unsigned int heigth);    void FillRectangle(const RgbColor& rgb,unsigned int x0,unsigned int y0,unsigned int width,unsigned int heigth);
41    
42      // Utility functions
43      bool ConvertToGrayScale();    // Pure grey scale conversion
44      bool ReduceColorDepth(const AtariClut* pClut=0);
45      bool ReduceColorDepthPerScanline(const std::map<int,AtariClut>* pCluts=0);
46    
47          // Utility functions    int FindBlocks(std::string& block_data) const;
         bool ConvertToGrayScale();      // Pure grey scale conversion  
         bool ReduceColorDepth(const AtariClut* pClut=0);  
         bool ReduceColorDepthPerScanline(const std::map<int,AtariClut>* pCluts=0);  
48    
49          int FindBlocks(std::string& block_data) const;    // Block copy functions
50      bool CreateFromImage(const ImageContainer& otherImage,unsigned int x,unsigned int y,unsigned int width,unsigned int height);  // Accepts itself as a valid source, can use that to crop a picture
         // Block copy functions  
         bool CreateFromImage(const ImageContainer& otherImage,unsigned int x,unsigned int y,unsigned int width,unsigned int height);    // Accepts itself as a valid source, can use that to crop a picture  
51    
52  private:  private:
53          FIBITMAP*       m_pBitmap;    FIBITMAP*     m_pBitmap;
54  };  };
55    
56    

Legend:
Removed from v.1259  
changed lines
  Added in v.1260

  ViewVC Help
Powered by ViewVC 1.1.26