#include <SimpleRGBImage.hh>
Public Member Functions | |
SimpleRGBImage () | |
SimpleRGBImage (const SimpleRGBImage &image) | |
SimpleRGBImage (unsigned int width, unsigned int height) | |
SimpleRGBImage (std::istream &is) | |
~SimpleRGBImage () | |
void | resize (unsigned int width, unsigned int height) |
void | read (std::istream &is) |
void | write (std::ostream &os) |
RGBColor & | operator() (unsigned int x, unsigned int y) |
const RGBColor & | operator() (unsigned int x, unsigned int y) const |
unsigned int | width () const |
unsigned int | height () const |
size_t | size () const |
RGBColor * | begin () |
const RGBColor * | begin () const |
RGBColor * | end () |
const RGBColor * | end () const |
RGBColor & | operator[] (size_t n) |
const RGBColor & | operator[] (size_t n) const |
SimpleRGBImage & | operator= (const SimpleRGBImage &image) |
It contains methods for loading and saving PPM images and for direct access to the pixels
|
Default Constructor. Creates an empty image |
|
Copy Constructor. |
|
Size Constructor. Creates an image of arbitrary dimensions
|
|
Load Constructor. Loads an image from an input stream. See read-function for details.
|
|
Destructor |
|
begin of image
|
|
end of image
|
|
height of the image
|
|
unchecked access to a pixel (two-dimensional position)
|
|
operator=
|
|
operator[]
|
|
read an image from the given stream in ASCII PPM format (image Header "P3")
|
|
resize image to width*height. If it has already this size, nothing is done
|
|
size of the image (number of pixels)
|
|
width of the image
|
|
write the image to the given stream in ASCII PPM format (image Header "P3")
|