Panda3D
Loading...
Searching...
No Matches
config_pnmimage.cxx
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_pnmimage.cxx
10 * @author drose
11 * @date 2000-03-19
12 */
13
14#include "config_pnmimage.h"
15#include "pnmFileType.h"
16#include "pnmFileTypeRegistry.h"
17
18#include "dconfig.h"
19
20#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_PNMIMAGE)
21 #error Buildsystem error: BUILDING_PANDA_PNMIMAGE not defined
22#endif
23
24Configure(config_pnmimage);
25NotifyCategoryDef(pnmimage, "");
26
27ConfigureFn(config_pnmimage) {
29}
30
31ConfigVariableBool pfm_force_littleendian
32("pfm-force-littleendian", false,
33 PRC_DESC("This forces a pfm file to be read as a sequence of little-endian "
34 "floats, even if its scale factor is given as a positive number."));
35
36ConfigVariableBool pfm_reverse_dimensions
37("pfm-reverse-dimensions", false,
38 PRC_DESC("Understands that the width and height of a pfm file are given "
39 "backwards, in the form height width instead of width height, "
40 "on input. Does not affect output, which is always written width height."));
41
42ConfigVariableBool pfm_resize_quick
43("pfm-resize-quick", true,
44 PRC_DESC("Specify true to implement PfmFile::resize() with a \"quick\" filter, "
45 "but only when the pfm is being downsampled (to a smaller size). "
46 "This just controls the behavior of resize(); you can "
47 "always call quick_filter() explicitly."));
48
49ConfigVariableBool pfm_resize_gaussian
50("pfm-resize-gaussian", true,
51 PRC_DESC("Specify true to implement PfmFile::resize() with a higher-quality "
52 "Gaussian filter, or false to implement it with a faster box "
53 "filter. If pfm-resize-quick is also true, this only takes effect "
54 "when the pfm is being upsampled. This just controls the behavior "
55 "of resize(); you can always call box_filter() or gaussian_filter() "
56 "explicitly."));
57
58ConfigVariableDouble pfm_resize_radius
59("pfm-resize-radius", 1.0,
60 PRC_DESC("Specify the default filter radius for PfmFile::resize(). "
61 "This just controls the behavior of resize(); you can "
62 "always call box_filter() or gaussian_filter() explicitly with "
63 "a specific radius."));
64
65/**
66 * Initializes the library. This must be called at least once before any of
67 * the functions or classes in this library can be used. Normally it will be
68 * called by the static initializers and need not be called explicitly, but
69 * special cases exist.
70 */
71void
73 static bool initialized = false;
74 if (initialized) {
75 return;
76 }
77 initialized = true;
78
79 PNMFileType::init_type();
80}
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a floating- point type.
void init_libpnmimage()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.