fgi_loadpcx() (Fastgraph/Image legacy function)

Win32 DirectX Fastgraph/Light

Prototype

int fgi_loadpcx (char *filename, int flags, int handle);

Function fgi_loadpcx (ByVal filename As String, ByVal flags As Long, ByVal handle As Long) As Long

function fgi_loadpcx (filename : string; flags, handle : integer) : integer;

Description

The fgi_loadpcx() legacy function displays a PCX file stored in an FGI library. It is equivalent to the fgi_showpcx() function and is provided for compatibility with the DOS version of Fastgraph/Image.

256-color PCX files are reduced to the 236 non-system colors if color reduction is enabled. 16-color and monochrome PCX files are always remapped to colors 10 to 25 to avoid conflicts with the system colors.

Parameters

filename is the name of the PCX file. It may only include a file name and extension (such as PICTURE.PCX) and must be terminated by a null character (that is, a zero byte).

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

Bit

Value

Meaning

0

0

Use palette values stored in the PCX file

0

1

Use the current palette settings

1

0

Display image at position indicated in PCX header

1

1

Display image at current graphics position

2

Ignored

3

0

Enable automatic color reduction

3

1

Disable automatic color reduction

Bit 3 is meaningful only when bit 0 is zero. All other bits are reserved for future use and should be zero.

handle is the file handle for the FGI library containing filename.

Return value

0 = Success

-1 = Error reading the FGI library

-2 = The requested file is not in the FGI library

-3 = The requested file is not a PCX file

-4 = The PCX file cannot be loaded into the active virtual buffer

-5 = Error allocating memory

Restrictions

A logical palette must be defined and realized in order to use the palette values stored in the PCX file.

24-bit PCX files can only be loaded into direct color virtual buffers.

Replaced by

fgi_showpcx()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.