PDFium Delphi Component Docs

Image 属性

组件: TPdf  ·  单元: PDFium
索引属性 — 返回当前页面上的一个已解码图像对象(尺寸、像素数据、DPI、位深、色彩空间、ICC profile)

语法

property Image[Index: Integer]: TPdfImage; // read only

说明

索引只读属性,返回当前页面上的一个已解码图像对象(Width、Height、Data、RawData、Filters、HorizontalDpi、VerticalDpi、BitsPerPixel、ColorSpace、MarkedContentId 和 IccProfile)

要求 Active 为 True。传入 0 .. ImageCount - 1 范围内从 0 开始的图像索引

返回的 TPdfImage 记录归调用方所有,是调用时图像数据与元数据的快照

参数

Index位于 0 .. ImageCount - 1 范围内的基于 0 的索引

备注

示例

var
  I: Integer;
begin
  if not Pdf1.Active then Exit;
  for I := 0 to Pdf1.ImageCount - 1 do
  begin
    // 检查 Pdf1.Image[I]
    Memo1.Lines.Add(IntToStr(I));
  end;
end;

参见

ImageCount, BitmapCount, ObjectHandle