#include <Inventor/SbImage.h>
Public Methods | |
SbImage (void) | |
SbImage (const unsigned char *bytes, const SbVec2s &size, const int bytesperpixel) | |
~SbImage (void) | |
void | setValue (const SbVec2s &size, const int bytesperpixel, const unsigned char *bytes) |
unsigned char * | getValue (SbVec2s &size, int &bytesperpixel) const |
SbBool | readFile (const SbString &filename, const SbString *const *searchdirectories=NULL, const int numdirectories=0) |
int | operator== (const SbImage &image) const |
int | operator!= (const SbImage &image) const |
Static Public Methods | |
SbString | searchForFile (const SbString &basename, const SbString *const *dirlist, const int numdirs) |
This class is a Coin extension to the original Open Inventor API.
|
Default constructor. |
|
Constructor which sets the data using setValue().
|
|
Destructor. |
|
Sets the image to size and bytesperpixel. If bytes != NULL, data is copied from bytes into this class' image data. If bytes == NULL, the image data is left uninitialized. The image data will always be allocated in multiples of four. This means that if you set an image with size == (1,1) and bytesperpixel == 1, four bytes will be allocated to hold the data. This is mainly done to simplify the export code in SoSFImage and normally you'll not have to worry about this feature. |
|
Returns the image data. |
|
Reads image data from filename. In Coin, simage is used to load image files, and several common file formats are supported. simage can be downloaded from our webpages. If loading fails for some reason this method returns FALSE, and the instance is set to an empty image. If the file is successfully loaded, the file image data is copied into this class. If numdirectories > 0, this method will search for filename in all directories in searchdirectories. |
|
Compare image of image with the image in this class and return |
|
Compare image of image with the image in this class and return |
|
Given a basename for a file and and array of directories to search (in dirlist, of length numdirs), returns the full name of the file found. In addition to looking at the root of each directory in dirlist, we also look into the subdirectories texture/, textures/, images/, pics/ and pictures/ of each dirlist directory. If no file matching basename could be found, returns an empty string. |