Bmp: TBitmap;
property ObjectBitmap[Index: Integer]: TBitmap; // read only
ObjectType[Index] = otImage이면 Index 위치의 페이지 객체를 새로 할당한 VCL/LCL TBitmap으로 반환하고, 이미지가 아닌 페이지 객체에는 nil을 반환하는 indexed 읽기 전용 프로퍼티입니다
Active가 True여야 합니다. 유효한 인덱스는 0 .. ObjectCount - 1입니다(0 .. BitmapCount - 1 범위로 이미지만 인덱싱하려면 대신 Bitmap[Index]를 사용하세요)
반환된 TBitmap 인스턴스는 호출자가 소유하므로 다 쓴 뒤 Free를 호출해야 합니다
| Index | 0 .. ObjectCount - 1 범위의 0 기반 페이지 객체 인덱스입니다 |
ObjectType[Index] = otImage(또는 Assigned(Bmp))를 확인하고, try .. finally 블록에서 해제하세요RemoveObject나 InsertObjectAtIndex 등)은 페이지 객체 인덱스를 바꾸니, 편집 뒤에는 ObjectCount를 다시 질의하세요
var
I: Integer;
Bmp: TBitmap;
begin
if not Pdf1.Active then Exit;
for I := 0 to Pdf1.ObjectCount - 1 do
if Pdf1.ObjectType[I] = otImage then
begin
// inspect Pdf1.ObjectBitmap[I]
Bmp := Pdf1.ObjectBitmap[I];
try
if Assigned(Bmp) then
Memo1.Lines.Add(Format('Object %d: %dx%d', [I, Bmp.Width, Bmp.Height]));
finally
Bmp.Free;
end;
end;
end;