dms::FileImage

Source Code

Class Specification

#include <dms/FileImage.h>

FileImage(char * filename=0);
void loadFile(char * filename);

Description

FileImage(char * filename)

If a file name is passed to the constructor, the given file is loaded. Otherwise, it defaults to an empty, 0x0 image.
Example:

FileImage image("texture.jpg");
void loadFile(char * filename)

Loads image data from the given file. loadFile() currently supports TIFF, JPEG, and SGI (RGB) formatted images; it attempts to determine the file's type based on the extension of filename. Therefore, the name should end in ".tif", ".tiff", ".jpg", ".jpeg", ".sgi", or ".rgb", as appropriate.
Example:

FileImage image;
image.loadFile("mandrill.tif");