ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Utility Functions > IG_util_resolution_units_convert

This utility converts resolution data into new units.


Copy Code
AT_ERRCOUNT ACCUAPI IG_util_resolution_units_convert(
        AT_RESOLUTION* Resolution,
        enumIGResolutionUnits NewUnits


Name Type Description
Resolution AT_RESOLUTION* Pointer to structure containing resolution info.
NewUnits enumIGResolutionUnits New resolution units.

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:

This function does not process image pixels.


Copy Code
// Initialize resolution as 300 DPI
AT_RESOLUTION Resolution = {300, 1, 300, 1, IG_RESOLUTION_INCHES}; 
// Convert into PPM
enumIGResolutionUnits NewUnits = IG_RESOLUTION_METERS;
IG_util_resolution_units_convert(&Resolution, NewUnits); 
Is this page helpful?
Yes No
Thanks for your feedback.