The Black Ice Imaging Toolkits support many file formats including: TIF, BMP, GIF, PCX, JPG etc. The Black Ice Imaging Toolkits include functions for loading an image file into a handle or bitmap. Developers can specify a specific page number within the image file to load. There are specific loading functions for each file format as well as a general loading function (LoadImageIntoDIB), which can be used to load any supported image format.
[C++]
/* Load a TIFF file from a file on Disk*/
/* Use LoadTIFFIntoDib from BiTiff.dll */
#include “BiTiff.h”
/* 1. parameter: Path and name of the file to load
2. parameter: Number of the image (zero based integer)
3. parameter: Display information dialog
If hDib is zero loading has failed. */
HANDLE hDib = LoadTiffIntoDIB(“C:\\Images\\Test.tif“, 0,
FALSE);
[VB]
‘ Load a TIFF file from a file on Disk
‘ Use LoadTIFFIntoDIB from BiTiff.ocx
Dim BITiffobj As Object
Dim hDib as Long
‘ hDib: Handle of the DIB
‘ BITiffobj Object for BiTiff
Set BITiffobj = CreateObject("BITIFF.BITiffCtrl.1")
‘ 1. parameter: Path and name of the file to load
‘ 2. parameter: Number of the image (zero based integer)
‘ 3. parameter: Display information dialog
‘ If hDib is zero loading has failed.
hDib = BITiffobj.LoadTiffIntoDIB(“C:\Images\Test.tif”, 0, _
0)
Set BITiffobj = Nothing
[C#]
/* Load a TIFF file from a file on Disk */
/* Use LoadTIFFIntoDIB from BiTiff.ocx */
int hDib;
/* 1. parameter: Path and name of the file to load
2. parameter: Number of the image (zero based integer)
3. parameter: Display information dialog
If hDib is zero loading has failed. */
hDib = BiTiff.LoadTIFFIntoDIB(“C:\\Images\\Test.tif”, 0,
false);