15 #include "pnmWriter.h"
28 _file = (ostream *)NULL;
92 if (_x_size <= 0 || _y_size <= 0) {
101 for (y = 0; y < _y_size; y++) {
102 if (!
write_row(array + y * _x_size, alpha + y * _x_size)) {
virtual bool supports_grayscale() const
Returns true if this particular PNMWriter understands grayscale images.
virtual bool write_pfm(const PfmFile &pfm)
Writes floating-point data from the indicated PfmFile.
virtual bool supports_write_row() const
Returns true if this particular PNMWriter supports a streaming interface to writing the data: that is...
static void consider_yield()
Possibly suspends the current thread for the rest of the current epoch, if it has run for enough this...
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 write_header()
If supports_write_row(), above, returns true, this function may be called to write out the image head...
Defines a pfm file, a 2-d table of floating-point numbers, either 3-component or 1-component, or with a special extension, 2- or 4-component.
virtual bool supports_stream_write() const
Returns true if this particular PNMWriter can write to a general stream (including pipes...
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_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_integer()
Returns true if this PNMFileType can accept an integer image type, false if it can only accept a floa...