This method saves the current Snowbnd image object to a returned byte array. Multi-page TIFF and PDF file formats are supported.

You can save images as black and white, grayscale or color by specifying the appropriate bit depth and choosing an output format that supports that bit depth. To determine the bit depth of the image you have loaded, you may use the getBitsPerPixel(void) method.

See Color Manipulation Methods for more information on changing the color and bit-depth of an image. See the “Supported Bit Depths for Image Formats” in Supported File Formats for details on what bit-depths are available for each format.

You can find the samples for using this methodin the \Samples\com\snowbound\samples directory. This method is used in the The Save Page to Memory Sample sample.

Syntax

int IMG_save_bitmap(byte dos[], int buff_inc, int comp_type, int error[]);

Remark

IMG_save_bitmap(byte, int, int, int) method variables:

Variable Description
dos Buffer to use.
buff_inc Amount that the buffer will grow if needed.
comp_type Output file format to write. The output constants for currently supported and unsupported file types are defined in Supported File Formats.
error Returns the size of the data. If the value is less than 0, then an error code is displayed.

Returns

Returns the value of the output file size in bytes.