ImageGear for C and C++ on Linux v18.10 - Updated
IG_convert_PPM_to_DPI
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Resolution Unit Conversion Functions > IG_convert_PPM_to_DPI

Converts Pels Per Meter (PPM) to Dots Per Inch (DPI).

Declaration:

 
Copy Code
LONG ACCUAPI IG_convert_PPM_to_DPI(
        LONG lPelsPerMeter
);

Arguments:

Name Type Description
lPelsPerMeter LONG A variable of type LONG, holding the pels per meter (PPM) value that can be converted to dots per inch (DPI).

Return Value:

Returns a LONG indicating the DPI of an image.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
LONG      IPpm, IDpi;
...
IPpm=IG_convert_PPM_to_DPI(IPpm);
...

Remarks:

"Pels" is an abbreviated term for pixels. This function can be useful when you are converting a DIB to a format that supports dots per inch. The header structure of a DIB (the BIMAPINFOHEADER) contains two fields whose values are defined in "pels per meter": LONG biXPelsPerMeter and LONG biYPelsPerMeter.