var
Picture: TPicture;
Bitmap: TBitmap;
I: integer;
AData: THandle;
AFormat: Word;
APalette: HPALETTE;
begin
Bitmap := TBitmap.Create;
Picture := TPicture.Create;
try
for I := 0
to Clipboard.FormatCount - 1
do
begin
AFormat := Clipboard.Formats[I];
if Picture.SupportsClipboardFormat(AFormat)
then
begin
AData := Clipboard.GetAsHandle(AFormat);
APalette := Clipboard.GetAsHandle(CF_PALETTE);
Picture.LoadFromClipboardFormat(AFormat, AData, APalette);
// *** AV
DrawPadStamp.PictureToLogo(Picture);
Bitmap.Width := FThumbnailWidth;
Bitmap.Height := FThumbnailHeight;
Bitmap.Canvas.Brush.Color := clWhite;
Bitmap.Canvas.FillRect(Rect(0, 0, Bitmap.Width, Bitmap.Height));
Bitmap.Canvas.StretchDraw(ThumbnailRect(Picture.Width, Picture.Height,
FThumbnailWidth, FThumbnailHeight), DrawPadStamp.Logo);
LogoImage.Picture.Assign(Bitmap);
Break;
end;
end;
finally;
Bitmap.Free;
Picture.Free;
end;
end;