Supported Browsers Home   
MGL_getPCXSizeExt Previous   
MGL_getPNGSizeExt Next   
External Functions Up   

MGL_getPNGSize

Obtain the dimensions of a PNG file from disk.

Declaration

ibool MGLAPI MGL_getPNGSize(
    const char *PNGName,
    int *width,
    int *height,
    int *bitsPerPixel,
    pixel_format_t *pf)

Prototype In

mgraph.h

Parameters

PNGName

Name of the bitmap file to load header for

width

Place to store the bitmap width

height

Place to store the bitmap height

bitsPerPixel

Place to store the bitmap pixel depth

pf

Place to store the bitmap pixel format information

 

Return Value

True if the PNG file was found, false if not.

Description

This functions loads all the header information for a PNG file from disk, without actually loading the bits for the bitmap surface. This is useful to determine the dimensions and pixel format for the bitmap before it is loaded, so you can create an appropriate memory device context that you can load the bitmap into with the MGL_loadPNGIntoDC function.

See Also

MGL_loadPNG, MGL_loadPNGIntoDC

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