18 PNMWriter(
PNMFileType *type, std::ostream *file,
bool owns_file) :
20 _owns_file(owns_file),
37 INLINE
void PNMWriter::
38 set_color_type(ColorType type) {
39 set_num_channels((
int)type);
45 INLINE
void PNMWriter::
46 set_num_channels(
int num_channels) {
47 nassertv(num_channels >= 1 && num_channels <= 4);
48 _num_channels = num_channels;
54 INLINE
void PNMWriter::
55 set_maxval(xelval maxval) {
62 INLINE
void PNMWriter::
63 set_x_size(
int x_size) {
64 nassertv(x_size >= 0);
71 INLINE
void PNMWriter::
72 set_y_size(
int y_size) {
73 nassertv(y_size >= 0);
84 PNMImageHeader::operator = (header);
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.
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...