THotPDF.DecodeLoadedImageRegion Method

Decodes an exact source-coordinate rectangle from one loaded image XObject stream into a caller-owned TBitmap

Declaration

function DecodeLoadedImageRegion(AImageStream: THPDFStreamObject;
  RegionLeft, RegionTop, RegionRight, RegionBottom: Integer): TBitmap;

Unit

HPDFDoc

Parameters

NamePurpose
AImageStreamLoaded image XObject stream to decode
RegionLeftInclusive left source coordinate
RegionTopInclusive top source coordinate
RegionRightExclusive right source coordinate
RegionBottomExclusive bottom source coordinate

Return value

Returns a newly allocated bitmap containing the clamped non-empty region, or nil when the image or requested geometry cannot be decoded

Usage notes

Related APIs