22 PNMWriter(
PNMFileType *type, ostream *file,
bool owns_file) :
24 _owns_file(owns_file),
46 INLINE
void PNMWriter::
47 set_color_type(ColorType type) {
48 set_num_channels((
int)type);
56 INLINE
void PNMWriter::
57 set_num_channels(
int num_channels) {
58 nassertv(num_channels >= 1 && num_channels <= 4);
59 _num_channels = num_channels;
67 INLINE
void PNMWriter::
68 set_maxval(xelval maxval) {
77 INLINE
void PNMWriter::
78 set_x_size(
int x_size) {
79 nassertv(x_size >= 0);
88 INLINE
void PNMWriter::
89 set_y_size(
int y_size) {
90 nassertv(y_size >= 0);
104 PNMImageHeader::operator = (header);
void copy_header_from(const PNMImageHeader &header)
Initializes all the data in the header (x_size, y_size, num_channels, etc.) to the same values indica...
This is the base class of a family of classes that represent particular image file types that PNMImag...
PNMFileType * get_type() const
Returns a pointer to the PNMFileType object that created this PNMWriter.
bool is_valid() const
Returns true if the PNMWriter can be used to write data, false if something is wrong.