GINO Graphics Suite - GINO v9.0  

gPutImageFile

Syntax

[C/C++:]
void gPutImageFile(int type, char file[],int *xgrid, int *ygrid, int pixbuf[]);
[F90:]
subroutine gPutImageFile(type, file, xgrid, ygrid, pixbuf)

integer, intent(in) :: type,xgrid,ygrid,pixbuf(*)
character*(*), intent(in) :: file

Arguments

type
Image type

= GBMPFILE, Uncompressed Windows Bitmap file (BMP)
= GXWDFILE, X Windows Dump format (XWD)
= GICOFILE, Windows Icon file (ICO)
= GJPEGFILE, JPEG image format (JPG)
= GPNGFILE, Portable Network Graphics file (PNG)

file
Metafile file name

xgrid
Image width in pixels

ygrid
Image height in pixels

pixbuf
Image array

Description

The routine gPutImageFile() will generate a metafile of the specified type from the data stored in the array pixbuf. The metafile will be created in the specified file on disk.

The data stored in the pixbuf array may be either 8 bit or 24 bit data and is in the same format as that created by the routine gGetImageFile() or used by gDrawPixelArea() or gDrawCellArray(). The data may also be generated programatically by the application prior to calling this routine. Where the image contains 8 bit data, this is interpreted as colour indices and the current GINO colour table is added to the metafile to give the required mapping.

Note that Windows Icon files cannot be created when the pixbuf array contains 24 bit image data as this form of metafile can only contain 8 bit data. An error message is generated if this situation arises.

See Also

gPutImageFile Usage
gDrawCellArray
gDrawPixelArea
gGetImageFile