Angband
Functions
readpng.c File Reference

This package provides a routine to read a PNG file and set up the device dependent version of the image. More...

#include <windows.h>
#include "png.h"
#include "readdib.h"

Functions

bool ReadDIB2_PNG (HWND hWnd, LPSTR lpFileName, DIBINIT *pInfo, DIBINIT *pMask, bool premultiply)
 Extract the "WIN32" flag from the compiler. More...
 

Detailed Description

This package provides a routine to read a PNG file and set up the device dependent version of the image.

This file has been modified for use with "Angband 2.9.2" This file has been modified for use with "z+Angband 0.3.3"

COPYRIGHT:

(C) Copyright Microsoft Corp. 1993. All rights reserved.

You have a royalty-free right to use, modify, reproduce and distribute the Sample Files (and/or any modified version) in any way you find useful, provided that you agree that Microsoft has no warranty obligations or liability for any Sample Application Files which are modified.

Function Documentation

bool ReadDIB2_PNG ( HWND  hWnd,
LPSTR  lpFileName,
DIBINIT pInfo,
DIBINIT pMask,
bool  premultiply 
)

Extract the "WIN32" flag from the compiler.

Imports a DIB from a PNG file. Once the DIB is loaded, the function also creates a bitmap and palette out of the DIB for a device-dependent form.

Returns true if the DIB is loaded and the bitmap/palette created, in which case, the DIBINIT structure pointed to by pInfo is filled with the appropriate handles, and false if something went wrong.

References bit_depth, fp, DIBINIT::hBitmap, DIBINIT::hDIB, header, height, DIBINIT::hPalette, DIBINIT::ImageHeight, DIBINIT::ImageWidth, info_ptr, NULL, PNG_COLOR_TYPE_GRAY, PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INFO_tRNS, PNG_LIBPNG_VER_STRING, row, row_pointers, void(), and width.