|
#include <PortablePicture.h>
Inheritance diagram for PortablePicture:
Public Methods | |
PortablePicture () | |
Standard constructor. | |
PortablePicture (int width_in, int height_in) | |
Constructor that takes the width and height in pixels. | |
void | getRange (T &our_min, T &our_max) |
Get the minimum and maximum storable color value. More... | |
void | loadFile (const char *filename) |
loadFile: try to load a picture file. More... | |
void | setDimensions (int width_in, int height_in) |
Sets the width and height of the picture, in pixels. | |
int | getWidth () const |
Gets the width of the image in pixels. | |
int | getHeight () const |
Gets the heightof the image in pixels. | |
T | getMaxColor () const |
ColorType | getInterpolated (float y, float x) const |
Gets a bilinearly interpolated color. | |
ColorType | at (unsigned int y, unsigned int x) const |
Standard accessor method. | |
ColorType * | operator[] (int row) |
Standard accessor method. | |
void | saveAs (const char *filename) const |
Saves the image to a file. More... | |
Public Attributes | |
std::vector< ColorType > | colorBuffer |
Our actual data. |
Possible input sources include jpg's, gif's, and bmp's. Uses Microsoft's "IPicture" interface.
Definition at line 115 of file PortablePicture.h.
|
Get the minimum and maximum storable color value. For unsigned byte, this is 0 to 255; for a float, it is 0 and 1.0. Definition at line 141 of file PortablePicture.h. Referenced by PortablePicture< unsigned char >::loadFile(). |
|
loadFile: try to load a picture file. Right now, this just handles the normal PortableXMaps, with the exception of PBM binary files (ie the "P4" kind), which we don't handle yet. Definition at line 161 of file PortablePicture.h. |
|
Saves the image to a file. The "bAscii" param indicates whether the file should be saved as ascii, as opposed to binary. Supported extensions are .pfm, .ppm, and .pgm. Definition at line 299 of file PortablePicture.h. |