vtlib library
Public Member Functions | List of all members
vtImage Class Reference
Inheritance diagram for vtImage:
Inheritance graph
[legend]

Public Member Functions

bool WriteJPEG (const char *fname, int quality=99, bool progress_callback(int)=NULL)
 
std::string GetFilename () const
 Return the name of the file, if any, from which the image was loaded.
 

Detailed Description

This class extends osg::Image with an interface to support vtdata's Bitmap operations and use vtdata's vtDIB. It is useful for creating images in memory.

If you are going to use OSG to load an image from disk, you must use osg::Image instead, which can be loaded with osgDB::readImageFile.

A common use for an image is as a texture map for a textured material, by passing it to vtMaterial::SetTexture().

Member Function Documentation

bool vtImage::WriteJPEG ( const char *  fname,
int  quality = 99,
bool   progress_callbackint = NULL 
)

Write this image to a JPEG file. Quality setting is the same as libjpeg, in the range of 0..100. 99 is a typically useful quality setting.