ImageGear for C and C++ on Windows v19.7 - Updated
Image Creation Helper Function (used by the functions that follow)
User Guide > Concepts > Migrating from ImageGear v14 > Pixel Access Examples > Image Creation Helper Function (used by the functions that follow)

 
Copy Code
// Create a 24-bit RGB image (initially filled with black pixels)
HIGEAR createRGB24(AT_DIMENSION w, AT_DIMENSION h)
{
    HIGEAR hImage;
    HIGDIBINFO hDIB;
    AT_INT d[3] = { 8, 8, 8 };   // 8 bits per channel for R, G, B
    IG_DIB_info_create(&hDIB, w, h, IG_COLOR_SPACE_ID_RGB, 3, d);
    IG_image_create(hDIB, &hImage);
    return hImage;
}