API referenceImages

pdfSetUseImageInterpolationEx

Set the PDF /Interpolate flag on a specific image (plain

C
BOOL32 __stdcall pdfSetUseImageInterpolation(PPDF IPDF, uint32_t Handle, BOOL32 Value);
BOOL32 __stdcall pdfSetUseImageInterpolationEx(PIMG Image, BOOL32 Value);
Delphi
function pdfSetUseImageInterpolation(const IPDF: PPDF; Handle: Cardinal; Value: LongBool): LongBool; stdcall;
function pdfSetUseImageInterpolationEx(Image: PIMG; Value: LongBool): LongBool; stdcall;

Purpose. Set the PDF /Interpolate flag on a specific image (plain form) — controlling whether a PDF viewer should smooth-scale the image when displayed at a size other than its native resolution.

Description. pdfSetUseImageInterpolation is real: Handle = 0 targets the most-recently-inserted image; a non-zero Handle targets that specific image; either way, the Interpolate flag is stored on the FImages entry and genuinely consulted at document-serialization time to emit (or omit) the /Interpolate true entry on the image XObject dictionary. pdfSetUseImageInterpolationEx is a confirmed, explicitly self-documented stub — Result := False unconditionally, with the source comment stating plainly: "takes a standalone PIMG image-object handle, which this engine does not expose yet... Real PIMG objects arrive with W08" — i.e. this was written before pdfCreateImageObj's PIMG mechanism (Image Objects and Introspection) existed, and was never updated to use it once it did. Passing any PIMG (even one validly minted by pdfCreateImageObj) to this function always fails.

Parameters.

ParameterDescription
IPDF*(plain only)* Document handle.
Handle*(plain only)* 0 = most-recently-inserted image; non-zero = that specific image.
Image*(Ex only)* Ignored — always fails regardless of value, including a validly-minted PIMG.
ValueWhether the viewer should interpolate when scaling.

Return value. pdfSetUseImageInterpolation: True on success; False if no images exist / Handle unknown. pdfSetUseImageInterpolationEx: always False.

See also. pdfCreateImageObj.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Images
Category

Setters

Exported names

pdfSetUseImageInterpolationEx

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.