ImageGear for C and C++ on Windows v19.6 - Updated
Stripped Images
User Guide > How to Work with... > Formats with Additional Functionality > TIFF, MODCA, and IOCA > Stripped Images

To expedite loading and displaying large images, ImageGear provides alternate storage schemes that allow a large image to be loaded in segments. Such segments are loaded and pieced together in sequential order.

One of the storage schemes developed was stripped storage. A stripped image contains offsets to numerous groups of pixel rows. Each strip is the full width of the image. The diagrams below show an image stored in strips (shown separated), and the same image pieced together in memory:

In the actual DIB, there are no spaces between strips. The header simply contains the address of the leftmost pixel of the first row of each strip. The spaces between the strips in the image on the left are just for illustrative purposes. On the right, the image has been loaded and pieced together in memory.

The TIFF format, in which the use of stripped storage was once commonplace, rarely uses this scheme today. However, there are many old images still in use that were created with this storage scheme, and ImageGear fully supports these images.

The loading and saving of stripped images using ImageGear is no different than loading or saving a non-stripped image. You can use IG_load_file() or any other ImageGear loading API, without making any special settings. When loading, ImageGear will automatically detect the stripped storage and piece all of the strips together in the proper order.

Once in memory, a stripped image will be like any other image loaded into memory. It will be a DIB with a HIGEAR handle. You can now save it to any ImageGear-supported format. If you would like to save it again using stripped storage, you may do so using ImageGear Format Filter IG_fltr_ctrl_set()/IG_fltr_ctrl_get() functions. Of course, you must choose a file format that supports stripped storage. You can save a TIFF image with stripped storage by setting the number of strips to use. Here is the call you would make:

 
Copy Code
/* get current value of NUMBER_OF_STRIPS control parameter */
IG_fltr_ctrl_get(IG_FORMAT_TIF, "NUMBER_OF_STRIPS", FALSE, NULL, NULL,
(LPVOID)nNumberOfStrips, sizeof(nNumberOfStrips));
/* set new value to NUMBER_OF_STRIPS control parameter */
IG_fltr_ctrl_set(IG_FORMAT_TIF, "NUMBER_OF_STRIPS", (LPVOID)3,
sizeof(nNumberOfStrips));

In fact, there are a number of ways that a TIFF may be stored using IG_fltr_ctrl_set() with WRITE_CONFIG parameter. See this control parameter and its range of settings in TIFF Control Parameters Table located in the ImageGear Supported File Formats Reference.

TIFF filter control parameters that pertain to stripped storage include those shown in the following list:

Please see the section TIFF in the File Format Reference for more detailed information about each parameters.