LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

SaveBitmapToTIFFile

SaveBitmapToTIFFile

int SaveBitmapToTIFFile (int bitmapID, char filename[], int compression);

Purpose

Saves a bitmap image to a .tif file. This function returns an error if you attempt to save a transparent bitmap or a bitmap that originated from a metafile.

Parameters

Input
Name Type Description
bitmapID int ID of the bitmap object that contains the image. You can obtain the ID from functions such as NewBitmap and GetCtrlBitmap.
filename char [] Pathname of the file in which to save the image.

You can use a complete pathname or a simple filename. If the name is a simple filename, the file is saved in the directory that contains the executable.
compression int The algorithm used to compress the bitmap data when it is saved to a .tif file. LabWindows/CVI supports the following compression algorithms:

Constant Value Compression Scheme
TIF_COMPRESSION_NONE 0 No compression
TIF_COMPRESSION_RLE 1 32773 - PackBits compression (also referred to as Macintosh RLE)
TIF_COMPRESSION_JPEG 2 7 - JPEG compression
TIF_COMPRESSION_ZIP 3 32946 - Deflate compression

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later

Was this information helpful?

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit