ImageGear for C and C++ on Linux v18.8 - Updated
IG_DIB_resolution_set
API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_resolution_set

This function copies resolution from lpResolution to DIB.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_resolution_set(
        HIGDIBINFO hDIB,
        const AT_RESOLUTION* lpResolution
);

Arguments:

Name Type Description
hDIB HIGDIBINFO DIB info handle.
lpResolution const AT_RESOLUTION* Pointer to struct to copy to DIB.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Example:

 
Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGDIBINFO hDIB;        /* DIB info handle */
AT_RESOLUTION res;      /* Image resolution to be set */
/* Set resolution to 300 DPI */
res.units = IG_RESOLUTION_INCHES;
res.xResNumerator = res.yResNumerator = 300;
res.xResDenominator = res.yResDenominator = 1;
nErrcount = IG_DIB_resolution_set(hDIB, &res);