Registriert seit: 6. Feb 2013
Ort: Freiburg
5 Beiträge
Delphi XE3 Enterprise
|
AW: COM DLL / Methodenaufruf mit Rückgabe
7. Feb 2013, 13:50
Hab die Lösung gefunden:
Grüße
Mark
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
myImageAC: TImageAC;
myTBitmapImage: TBitmapImage;
myIBitmapImage: ^IBitmapImage;
tempBitmap: TBitmap;
tempPicture: TPicture;
begin
myImageAC := TImageAC.Create(Self);
myImageAC.OpenImage('C:\Temp\DemoSlide\TestSlide');
myImageAC.Connect;
//
myTBitmapImage := TBitmapImage.Create(Self);
myIBitmapImage := Pointer(myTBitmapImage.DefaultInterface);
//
myImageAC.GetImageMap(7, myIBitmapImage^);
//
tempPicture := TPicture.Create;
SetOlePicture(tempPicture, myTBitmapImage .Picture as IPictureDisp);
tempBitmap := TBitmap.Create;
tempBitmap.Height := tempPicture.Height;
tempBitmap.Width := tempPicture.Width;
tempBitmap.Canvas.Draw(0, 0, tempPicture.Graphic);
tempBitmap.SaveToFile('C:\temp\testBitmap.tiff');
tempBitmap.Free;
tempPicture.Free;
myTBitmapImage.Free;
myImageAC.Free;
end;
Geändert von Webelch ( 7. Feb 2013 um 14:00 Uhr)
|