JPEG DisplayFastgraph's fg_showjpeg() function displays a color or grayscale baseline JPEG file in a direct color virtual buffer. The fg_showjpeg() function expects two parameters that are analogous to those of fg_showpcx(). That is, the first parameter is the name of the JPEG file, terminated by a null character, and the second parameter is a series of flags that controls how the image is displayed. The following table summarizes these flags.
The fg_showjpeg() function returns 0 if successful, 1 if the specified file wasn't found, 2 if the file is not a JPEG file, 3 if the file is not a baseline JPEG file or does not have a valid JPEG structure, or 4 if there was an error allocating memory. For example, the code shown here will display the file AQUARIUM.JPG with its upper left corner at the screen space position (16,16) in the active virtual buffer:
C/C++:
Delphi:
Visual Basic:
|
 
copyright 2001 Ted Gruber Software, Inc.