Panda3D
config_pnmimagetypes.h
1 // Filename: config_pnmimagetypes.h
2 // Created by: drose (17Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef CONFIG_PNMIMAGETYPES_H
16 #define CONFIG_PNMIMAGETYPES_H
17 
18 #include "pandabase.h"
19 
20 #ifdef HAVE_PNG
21 // If we are going to be including png.h (in the unrelated file
22 // pnmFileTypePNG.h), be sure to include it before including setjmp.h.
23 // Ugly hack due to png weirdness with setjmp.
24 #include <png.h>
25 #endif
26 
27 #include "notifyCategoryProxy.h"
28 #include "configVariableInt.h"
29 #include "configVariableString.h"
30 #include "configVariableBool.h"
31 #include "configVariableEnum.h"
32 #include "sgi.h"
33 
34 NotifyCategoryDecl(pnmimage_sgi, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
35 NotifyCategoryDecl(pnmimage_tiff, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
36 NotifyCategoryDecl(pnmimage_tga, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
37 NotifyCategoryDecl(pnmimage_img, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
38 NotifyCategoryDecl(pnmimage_soft, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
39 NotifyCategoryDecl(pnmimage_bmp, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
40 NotifyCategoryDecl(pnmimage_jpg, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
41 NotifyCategoryDecl(pnmimage_png, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
42 NotifyCategoryDecl(pnmimage_pnm, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
43 
44 enum SGIStorageType {
45  SST_rle = STORAGE_RLE,
46  SST_verbatim = STORAGE_VERBATIM,
47 };
48 
49 EXPCL_PANDA_PNMIMAGETYPES ostream &operator << (ostream &out, SGIStorageType sst);
50 EXPCL_PANDA_PNMIMAGETYPES istream &operator >> (istream &in, SGIStorageType &sst);
51 
52 extern ConfigVariableEnum<SGIStorageType> sgi_storage_type;
53 extern ConfigVariableString sgi_imagename;
54 extern ConfigVariableBool tga_rle;
55 extern ConfigVariableBool tga_colormap;
56 extern ConfigVariableBool tga_grayscale;
57 
58 extern ConfigVariableInt jpeg_quality;
59 
60 extern ConfigVariableBool png_palette;
61 
62 extern ConfigVariableInt bmp_bpp;
63 
64 enum IMGHeaderType {
65  IHT_none,
66  IHT_short,
67  IHT_long,
68 };
69 
70 EXPCL_PANDA_PNMIMAGETYPES ostream &operator << (ostream &out, IMGHeaderType iht);
71 EXPCL_PANDA_PNMIMAGETYPES istream &operator >> (istream &in, IMGHeaderType &iht);
72 
73 extern ConfigVariableEnum<IMGHeaderType> img_header_type;
74 extern ConfigVariableInt img_size;
75 
76 extern EXPCL_PANDA_PNMIMAGETYPES void init_libpnmimagetypes();
77 
78 #endif
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a string type.
This class specializes ConfigVariable as an enumerated type.
This is a convenience class to specialize ConfigVariable as an integer type.