THotPDF.AddImage Method

 

THotPDF.AddImage

THotPDF

 

למעלה  הקודם  הבא

Adds a specified image to PDF document.

 

Delphi syntax:

function AddImage(Image: TGraphic; Compression: THPDFImageCompressionType;

                            IsMask: boolean = False; MaskIndex: Integer = -1): Integer; overload;

 

function AddImage(FileName: TFileName; Compression: THPDFImageCompressionType;

                            IsMask: boolean = False; MaskIndex: Integer = -1): Integer; overload;

 

תיאור

קרא ל-AddImage כדי לרשום תמונה ולקבל image handle שניתן לצייר מאוחר יותר עם CurrentPage.ShowImage. overload הקובץ מקבל קובצי BMP ו-JPEG, בעוד overload הגרפיקה מקבל מופע TGraphic טעון. Compression בוחר את שיטת דחיסת תמונת PDF. IsMask מציין אם התמונה משמשת כמסכה, ו-MaskIndex מזהה את תמונת המסכה המשויכת

 

Code Example


var
  ImageHandle: Integer;
begin
  ImageHandle := HPDF.AddImage( '.\Sample.jpg', icJpeg );
  HPDF.CurrentPage.ShowImage( ImageHandle, 100, 200, 150, 100 );  // Draw the image at position 100,200 with size 150x100
end;

 

See also: CurrentPage.ShowImage