API referenceImages

pdfGetImageHeight

Return an image's native pixel dimensions by document handle.

C
int32_t __stdcall pdfGetImageHeight(PPDF IPDF, uint32_t Handle);
int32_t __stdcall pdfGetImageWidth(PPDF IPDF, uint32_t Handle);
Delphi
function pdfGetImageHeight(const IPDF: PPDF; Handle: Cardinal): Integer; stdcall;
function pdfGetImageWidth(const IPDF: PPDF; Handle: Cardinal): Integer; stdcall;

Purpose. Return an image's native pixel dimensions by document handle.

Description. Straightforward lookups into the FImages entry's ImgWidth/ImgHeight fields, as decoded at insertion/creation time — not recomputed from any on-page scale factor a pdfPlaceImage/pdfInsertImage call may have applied (those affect only the placement box on a page, not the stored native pixel dimensions this pair reports).

Parameters.

ParameterDescription
IPDFDocument handle.
HandleAn existing document image handle.

Return value. The native pixel width/height; 0 if Handle doesn't resolve.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetImageHeight(IntPtr IPDF, uint Handle);
Area
Images
Category

Getters

Exported names

pdfGetImageHeight

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.