#include "BITIFF.H"
BOOL CALLBACK DecompressToScreen( TFILEFORMAT nFormat,
HWND hWnd,
HDC hDC,
LPTSTR szFileName,
int nImage,
LPRECT lprScale,
UINT wMode)
Description
Decompress a black and white or color image to the screen. The DecompressToScreen() function should be called only in response to the WM_PAINT message.
Parameters
|
FILEFORMAT |
nFormat |
The image file format. |
|
HWND |
hWnd |
Window handle to display image. |
|
HDC |
hDC |
Device context. |
|
LPTSTR |
szFileName |
The path of Tiff file. |
|
int |
nImage |
The n'th image in the Image chain. |
|
LPRECT |
lprScale |
The X and Y scaling factor. |
|
UINT |
wMode |
Display mode. |
TFILEFORMAT nFormat can be set to:
E_FORMAT_AUTO - Automatically check for the file format.
E_FORMAT_TIFF - The file must be a TIFF file.
E_FORMAT_CALS - The file must be a CALS file.
UINT wMode can be set to:
BIS_ROTATE90 - Decompress the image by rotating it 90 degrees clockwise.
BIS_ROTATE180 - Decompress the image by rotating it180 degrees clockwise.
BIS_ROTATE270 - Decompress the image by rotating it 270 degrees clockwise.
BIS_SCALENORMAL - It will display the image proportionally. Same as DISP_NORMAL.
BIS_FITTOSCREEN - It will display the image proportionally and it forces the image to fit into the client area. Same as DISP_PREVIEW.
BIS_DRAFT - Display the image pixel to pixel without scaling.
BIS_INVERT - Display the image by inverting it's palette.
The Device Independent Bitmap flags.
DISP_NORMAL - It will display the image proportionally.
DISP_PREVIEW - It will display the image proportionally and it forces the image to fit into the client area. Same as BIS_FITTOSCREEN.
DISP_INVERT - Display the image by inverting it's palette. Same as BIS_INVERT.
Additional Information
This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.
Return values
TRUE on success, otherwise FALSE.
Requirements
Header : Declared in BiTiff.h; include BiTiff.h.
Library : Use BiTIFF.lib.
DLLs : BiTiff.dll.
References to related functions
See