18PNMWriter(
PNMFileType *type, std::ostream *file,
bool owns_file) :
20 _owns_file(owns_file),
37INLINE
void PNMWriter::
38set_color_type(ColorType type) {
39 set_num_channels((
int)type);
45INLINE
void PNMWriter::
46set_num_channels(
int num_channels) {
47 nassertv(num_channels >= 1 && num_channels <= 4);
48 _num_channels = num_channels;
54INLINE
void PNMWriter::
55set_maxval(xelval maxval) {
62INLINE
void PNMWriter::
63set_x_size(
int x_size) {
64 nassertv(x_size >= 0);
71INLINE
void PNMWriter::
72set_y_size(
int y_size) {
73 nassertv(y_size >= 0);
84 PNMImageHeader::operator = (header);
This is the base class of a family of classes that represent particular image file types that PNMImag...
bool is_valid() const
Returns true if the PNMWriter can be used to write data, false if something is wrong.
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...
PNMFileType * get_type() const
Returns a pointer to the PNMFileType object that created this PNMWriter.