/[projet1]/public/pc/tools/osdk/main/pictconv/includes/hires.h
Defence Force logotype

Contents of /public/pc/tools/osdk/main/pictconv/includes/hires.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1260 - (show annotations)
Sat Feb 14 20:26:49 2015 UTC (4 years, 7 months ago) by dbug
File MIME type: text/plain
File size: 2336 byte(s)
PictConv 0.21
- Added support for 32bit picture, to handle things like masking/opacity in the picture formats
- The -a1 mode will generate bytes with null value for blocks of 6 pixels with transparent alpha values (only active in monochrome or AIC conversion modes)
- Added the -f7 conversion mode for Oric pictures using the AIC coloring method.

1 #ifndef PICTURE_CONVERTER_H
2 #define PICTURE_CONVERTER_H
3
4 #include <map>
5 #include <string>
6
7 class TextFileGenerator;
8 class ImageContainer;
9
10 class PictureConverter
11 {
12 public:
13 enum MACHINE
14 {
15 MACHINE_ORIC,
16 MACHINE_ATARIST,
17 _MACHINE_MAX_
18 };
19
20 enum DITHER
21 {
22 DITHER_NONE,
23 DITHER_ALTERNATE,
24 DITHER_ORDERED,
25 DITHER_RIEMERSMA,
26 DITHER_FLOYD,
27 DITHER_ALTERNATE_INVERSED,
28 _DITHER_MAX_
29 };
30
31 enum BLOCKMODE
32 {
33 BLOCKMODE_DISABLED,
34 BLOCKMODE_ENABLED,
35 _BLOCKMODE_MAX_
36 };
37
38 enum TRANSPARENCY
39 {
40 TRANSPARENCY_NONE,
41 TRANSPARENCY_HOLES,
42 _TRANSPARENCY_MAX_
43 };
44
45 public:
46 static PictureConverter* GetConverter(MACHINE machine);
47 static void DeleteConverter(PictureConverter* pConverter);
48
49 MACHINE GetMachine() const { return m_machine; }
50 void SetDebug(bool flag_debug) { m_flag_debug=flag_debug; }
51
52 DITHER GetDither() const { return m_dither; }
53 void SetDither(DITHER dither);
54
55 BLOCKMODE GetBlockMode() const { return m_blockmode; }
56 void SetBlockMode(BLOCKMODE blockmode) { m_blockmode=blockmode; }
57
58 std::string GetBlockData() const { return m_block_data; }
59
60 virtual int GetFormat() const=0;
61 virtual bool SetFormat(int format)=0;
62
63 virtual int GetPaletteMode() const=0;
64 virtual bool SetPaletteMode(int paletteMode)=0;
65
66 virtual int GetTransparencyMode() const=0;
67 virtual bool SetTransparencyMode(int transparencyMode)=0;
68
69 virtual bool Convert(const ImageContainer& sourcePicture)=0;
70 virtual bool TakeSnapShot(ImageContainer& sourcePicture)=0;
71
72 virtual bool Save(int output_format,const std::string& output_filename,TextFileGenerator& cTextFileGenerator);
73
74 virtual void SaveToFile(long handle,int output_format)=0;
75
76 virtual unsigned char *GetBufferData()=0;
77 virtual unsigned int GetBufferSize()=0;
78
79 virtual unsigned char *GetSecondaryBufferData() { return 0; }
80 virtual unsigned int GetSecondaryBufferSize() { return 0; }
81
82
83 protected:
84 PictureConverter(MACHINE machine);
85 PictureConverter(); // N/A
86 virtual ~PictureConverter();
87
88 protected:
89 MACHINE m_machine;
90 DITHER m_dither;
91 BLOCKMODE m_blockmode;
92 TRANSPARENCY m_transparency;
93 bool m_flag_debug;
94
95 std::string m_block_data;
96 };
97
98 #endif

  ViewVC Help
Powered by ViewVC 1.1.26