Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SH::ShImage Class Reference

An image, consisting of a rectangle of floating-point elements. More...

#include <ShImage.hpp>

Inheritance diagram for SH::ShImage:

Inheritance graph
[legend]
Collaboration diagram for SH::ShImage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ShImage ()
 Construct an empty image.
 ShImage (int width, int height, int depth)
 Construct a black image at the given width/height/depth.
 ShImage (const ShImage &other)
 Copy an image.
ShImageoperator= (const ShImage &other)
 Copy the data from one image to another.
int width () const
 Determine the width of the image.
int height () const
 Determine the height of the image.
int elements () const
 Determine the depth (floats per pixel) of the image.
float operator() (int x, int y, int i) const
 Retrieve a particular component from the image.
float & operator() (int x, int y, int i)
 Retrieve a.
void loadPng (const std::string &filename)
 Load a PNG file into this image.
void savePng (const std::string &filename, int inverse_alpha=0)
 Save a PNG image into.
void savePng16 (const std::string &filename, int inverse_alpha=0)
 Save a PNG image into.
ShImage getNormalImage ()
const float * data () const
float * data ()
void dirty ()
ShMemoryPtr memory ()
ShPointer< const ShMemorymemory () const

Detailed Description

An image, consisting of a rectangle of floating-point elements.

This class makes it easy to read PNG files and the like from files. It stores the image data in a memory object which can then be shared with array, table, and texture objects.

Definition at line 42 of file ShImage.hpp.


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 18:38:12 2005 for Sh by  doxygen 1.4.1