fg_showjpeg()

Win32 DirectX Fastgraph/Light

Prototype

int fg_showjpeg (char *filename, int flags);

Function fg_showjpeg (ByVal filename As String, ByVal flags As Long) As Long

function fg_showjpeg (filename : string; flags : integer) : integer;

Description

The fg_showjpeg() function displays a JPEG file. The JPEG image can be either grayscale or color, but it must be a baseline JPEG file. Baseline JPEG files use Huffman encoding and cannot use the progressive, hierarchical, or lossless compression and storage modes.

Parameters

filename is the name of the JPEG file. It may include a path specification and must be terminated by a zero byte.

flags is a series of flags that controls how the image is displayed:

Flag

Meaning

FG_AT_XY

If specified, display the image relative to the current graphics position. If not, display the image relative to (0,0).

FG_FROMBUFFER

If specified, get the image data from the fg_imagebuf() buffer. If not, get the image data from the JPEG file.

Return value

0 = Success

1 = The specified file does not exist

2 = The specified file is not a JPEG file

3 = The specified file is not a baseline JPEG file or does not have a valid JPEG structure

4 = Error allocating memory

Restrictions

This function is meaningful only with direct color virtual buffers.

See also

fg_imagebuf(), fg_jpeghead(), fg_jpegsize()

Examples

Image, ImgProc

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.