Utilizing the New C++ Class API Wrapper
This Tech Tip appeared in Imaging News April 2004.
"Most people nowadays program in C++," says Martin Peloquin, one of Snowbound's top software engineers, "so we've added an API Wrapper to make the RasterMaster imaging SDK more Object-Oriented. This wrapper is also a preliminary API for the new C++ Class Library which will be made available within the year. Using the Wrapper now will make it easier to port your code if you decide to use the new upcoming Class Library."
Here is an example API:
int totalpages = IMGLOW_get_pages("example.mod");
int saveformat = TIFF_UNCOMPRESSED;
for (int page=0; i<totalpages ; page++)
{
int imageHandle = IMG_decompress_bitmap_page("example.mod",page);
....
int status = IMG_save_bitmap(imageHandle, "save_example.tif", saveformat);
status = IMG_delete_bitmap(imageHandle);
Here is that same API with the Wrapper:
Snowbnd *image = new Snowbnd();
int totalpages = image->IMGLOW_get_pages("example.mod");
int saveformat = TIFF_UNCOMPRESSED;
for (int page=0; i<totalpages ; page++)
{
int status = image->IMG_decompress_bitmap_page("example.mod",page);
...
status = image->IMG_save_bitmap("save_example.tif", saveformat);
}
delete image;

