27class EXPCL_PANDA_PNMIMAGE PNMWriter :
public PNMImageHeader {
29 INLINE PNMWriter(
PNMFileType *type, std::ostream *file,
bool owns_file);
40 INLINE
void set_color_type(ColorType type);
41 INLINE
void set_num_channels(
int num_channels);
42 INLINE
void set_maxval(xelval maxval);
43 INLINE
void set_x_size(
int x_size);
44 INLINE
void set_y_size(
int y_size);
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...
virtual int write_data(xel *array, xelval *alpha)
Writes out an entire image all at once, including the header, based on the image data stored in the g...
virtual bool write_header()
If supports_write_row(), above, returns true, this function may be called to write out the image head...
virtual bool supports_write_row() const
Returns true if this particular PNMWriter supports a streaming interface to writing the data: that is...
virtual bool write_pfm(const PfmFile &pfm)
Writes floating-point data from the indicated PfmFile.
virtual bool supports_stream_write() const
Returns true if this particular PNMWriter can write to a general stream (including pipes,...
virtual bool write_row(xel *array, xelval *alpha)
If supports_write_row(), above, returns true, this function may be called repeatedly to write the ima...
virtual bool supports_grayscale() const
Returns true if this particular PNMWriter understands grayscale images.
virtual bool supports_floating_point()
Returns true if this PNMFileType can accept a floating-point image type, false if it can only accept ...
virtual bool supports_integer()
Returns true if this PNMFileType can accept an integer image type, false if it can only accept a floa...
Defines a pfm file, a 2-d table of floating-point numbers, either 3-component or 1-component,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.