Back to index

extremetuxracer  0.5beta
Public Member Functions
pp::WriterPPM Class Reference

#include <ppm_writer.h>

List of all members.

Public Member Functions

 WriterPPM (const char *fileName, const Image &image)
 ~WriterPPM ()

Detailed Description

Definition at line 32 of file ppm_writer.h.


Constructor & Destructor Documentation

pp::WriterPPM::WriterPPM ( const char *  fileName,
const Image image 
)

Definition at line 26 of file ppm_writer.cpp.

{
       std::ofstream file;

       file.open(fileName);

       file << "P6\n# A Raw PPM file"
              << "\n# width\n" << int(image.width)
              << "\n# height\n" << int(image.height)
              << "\n# max component value\n255"<< std::endl;

       file.write((const char*)image.data,image.width*image.height*image.depth);
       file.close();
}

Definition at line 36 of file ppm_writer.h.

{};

The documentation for this class was generated from the following files: