ImageGear for C and C++ on Windows v20.0 - Updated
IG_convert_DPI_to_PPM
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Resolution Unit Conversion Functions > IG_convert_DPI_to_PPM

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

Declaration:

 
Copy Code
LONG ACCUAPI IG_convert_DPI_to_PPM(
        LONG lDotsPerInch
);

Arguments:

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

Return Value:

Returns a LONG indicating the pels per meter of an image.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code
LONG      IPpm, IDpi;
...
IPpm=IG_convert_DPI_to_PPM(IPpi);
...

Remarks:

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

Is this page helpful?
Yes No
Thanks for your feedback.