Panda3D
config_pnmimagetypes.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_pnmimagetypes.h
10  * @author drose
11  * @date 2000-06-17
12  */
13 
14 #ifndef CONFIG_PNMIMAGETYPES_H
15 #define CONFIG_PNMIMAGETYPES_H
16 
17 #include "pandabase.h"
18 
19 #ifdef HAVE_PNG
20 // If we are going to be including png.h (in the unrelated file
21 // pnmFileTypePNG.h), be sure to include it before including setjmp.h. Ugly
22 // hack due to png weirdness with setjmp.
23 #include <png.h>
24 #endif
25 
26 #include "notifyCategoryProxy.h"
27 #include "configVariableInt.h"
28 #include "configVariableString.h"
29 #include "configVariableBool.h"
30 #include "configVariableEnum.h"
31 #include "sgi.h"
32 
33 NotifyCategoryDecl(pnmimage_sgi, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
34 NotifyCategoryDecl(pnmimage_tiff, EXPCL_PANDA_PNMIMAGETYPES, EXPTP_PANDA_PNMIMAGETYPES);
35 NotifyCategoryDecl(pnmimage_exr, 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 std::ostream &operator << (std::ostream &out, SGIStorageType sst);
50 EXPCL_PANDA_PNMIMAGETYPES std::istream &operator >> (std::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 ConfigVariableInt png_compression_level;
61 extern ConfigVariableBool png_palette;
62 
63 extern ConfigVariableInt bmp_bpp;
64 
65 enum IMGHeaderType {
66  IHT_none,
67  IHT_short,
68  IHT_long,
69 };
70 
71 EXPCL_PANDA_PNMIMAGETYPES std::ostream &operator << (std::ostream &out, IMGHeaderType iht);
72 EXPCL_PANDA_PNMIMAGETYPES std::istream &operator >> (std::istream &in, IMGHeaderType &iht);
73 
74 extern ConfigVariableEnum<IMGHeaderType> img_header_type;
75 extern ConfigVariableInt img_size;
76 
77 extern EXPCL_PANDA_PNMIMAGETYPES void init_libpnmimagetypes();
78 
79 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a boolean type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a string type.
EXPCL_PANDA_PNMIMAGETYPES void init_libpnmimagetypes()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class specializes ConfigVariable as an enumerated type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.