Supported Browsers Home   
MGL_loadPNGIntoDC Previous   
MGL_localToGlobal Next   
External Functions Up   

MGL_loadPNGIntoDCExt

Load a PNG file directly into an existing device context

Declaration

ibool MGLAPI MGL_loadPNGIntoDCExt(
    MGLDC *dc,
    FILE *f,
    ulong dwOffset,
    ulong dwSize,
    int dstLeft,
    int dstTop,
    ibool loadPalette)

Prototype In

mgraph.h

Parameters

dc

Device context to output to

f

Open binary file to read bitmap from

dwOffset

Offset to start of PNG file within open file

dwSize

Size of PNG file in bytes

dstLeft

Left coordinate to align left edge of bitmap with

dstTop

Top coordinate to align top edge of bitmap with

loadPalette

true if you wish to load the images palette

 

Return Value

True if the PNG was loaded, false on error.

Description

This function is the same as MGL_loadPNGIntoDC, however it loads the file from a previously open file. This allows you to create your own large files with multiple files embedded in them.

If the PNG file has interlacing enabled MGL must create a memory buffer internally to render the image into before blitting to the dc. Therefore using non-interlaced images will reduce memory overhead and speed performance.

See Also

MGL_loadPNGIntoDC, MGL_loadBitmapIntoDCExt, MGL_loadPNG

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com