ScummVM API documentation
Thumbnails

Description

API for managing screen thumbnails used for save games.

Functions

bool Graphics::checkThumbnailHeader (Common::SeekableReadStream &in)
 
bool Graphics::skipThumbnail (Common::SeekableReadStream &in)
 
bool Graphics::loadThumbnail (Common::SeekableReadStream &in, Graphics::Surface *&thumbnail, bool skipThumbnail=false)
 
bool Graphics::createThumbnail (Graphics::Surface &thumb)
 
bool Graphics::saveThumbnail (Common::WriteStream &out)
 
bool Graphics::saveThumbnail (Common::WriteStream &out, const Graphics::Surface &thumb)
 
bool Graphics::createScreenShot (Graphics::Surface &surf)
 
Graphics::SurfaceGraphics::scale (const Graphics::Surface &srcImage, int xSize, int ySize)
 

Function Documentation

◆ checkThumbnailHeader()

bool Graphics::checkThumbnailHeader ( Common::SeekableReadStream in)

Checks for presence of the thumbnail save header. Seeks automatically back to start position after check.

Parameters
instream to check for header

◆ skipThumbnail()

bool Graphics::skipThumbnail ( Common::SeekableReadStream in)

Skips a thumbnail, if present.

Parameters
instream to process

◆ loadThumbnail()

bool Graphics::loadThumbnail ( Common::SeekableReadStream in,
Graphics::Surface *&  thumbnail,
bool  skipThumbnail = false 
)

Loads a thumbnail from the given input stream.

◆ createThumbnail()

bool Graphics::createThumbnail ( Graphics::Surface thumb)

Creates a thumbnail from screen contents.

◆ saveThumbnail() [1/2]

bool Graphics::saveThumbnail ( Common::WriteStream out)

Saves a thumbnail to the given write stream. Automatically creates a thumbnail from screen contents.

◆ saveThumbnail() [2/2]

bool Graphics::saveThumbnail ( Common::WriteStream out,
const Graphics::Surface thumb 
)

Saves a (given) thumbnail to the given write stream.

◆ createScreenShot()

bool Graphics::createScreenShot ( Graphics::Surface surf)

Grabs framebuffer into surface

Parameters
surfa surface
Returns
false if a error occurred

◆ scale()

Graphics::Surface* Graphics::scale ( const Graphics::Surface srcImage,
int  xSize,
int  ySize 
)

Scales a passed surface, creating a new surface with the result

Parameters
srcImageSource image to scale
xSizeNew surface width
ySizeNew surface height
Remarks
Caller is responsible for freeing the returned surface