Glossary Item Box

ImageMan DLL Suite Version 8 Submit feedback on this topic   

ImgXWriteBMPBlock

int IMAPI ImgXWriteBMPBlock (hJob, hDC, hBmp, nLines, lpBits, lpInfo)

This function writes a bitmap to the export file specified by hJob.

 

Parameter

Type

Description

hJob

HANDLE

Handle identifying job (from ImgXBeginWrite).

hDC

HANDLE

Handle to a device context which has the same color makeup as the image.

hBmp

HANDLE

Handle to the bitmap to output. This bitmap should not be selected into a device context at the time it is passed to this function.

nLines

int

Number of raster lines in this output block.

lpBits

LPSTR

Pointer to block of bits to be output.

lpInfo

LPXINFO

Points to the XINFO struct which describes the current state of this export job.

 

Return Value

The return value is IMGX_OK if the bitmap is exported successfully; otherwise, the return value is an ImageMan error code.

Comments

The given bitmap is written subsequent to any bits currently output -- there is no facility for writing blocks of the image out of order. Note that since the output file may be a backwards format (i.e., last line in image appears first in file, as in Windows BMP & DIB formats), you have to be careful when writing out your image in sections -- make sure you begin with the correct row (first or last, depending on the image file format). You can do this by checking the lFlags parameter of the XINFO struct for the XF_BACKWARDS flag -- if this flag is set, the strips should be written from bottom to top.

 

This function can be used to write several bitmaps in sequence, thus allowing a large bitmap to be written in several smaller sections.

Note

This function can handle a bitmap as large as you can create, so there is no need to export a bitmap in strips unless your application doesn't have the entire image as a single bitmap.

 

 


Copyright 2008 Data Techniques, Inc. All Rights Reserved