fgi_jpeghead() (Fastgraph/Image)

Win32 DirectX Fastgraph/Light

Prototype

int fgi_jpeghead (char *filename, void *header, int handle);

Function fgi_jpeghead (ByVal filename As String, header() As Any, ByVal handle As Long) As Long

function fgi_jpeghead (filename : string; var header; handle : integer) : integer;

Description

The fgi_jpeghead() function reads the header of a JPEG file stored in an FGI library into a 10-byte buffer. Strictly speaking, JPEG files do not have formal headers, but fgi_jpeghead() returns relevant information from the file's start of frame segment. We call it a header for consistency with other image file formats.

Parameters

filename is the name of the JPEG file. It may only include a file name and extension (such as PICTURE.JPG) and must be terminated by a zero byte.

header is the name of the 10-byte buffer to receive the JPEG file header.

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 baseline JPEG file

Restrictions

none

See also

fg_jpegsize(), fgi_showjpeg()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.