Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi wie kann ich ein image speichern und drucken (https://www.delphipraxis.net/16810-wie-kann-ich-ein-image-speichern-und-drucken.html)

Robertlu 23. Feb 2004 20:59


wie kann ich ein image speichern und drucken
 
hallo

ich hab mal wieder eine frage zu meinem mathe programm.
Ich möchte meine in einem image dargestellte z.B. Kugel oder eben etwas gezeichnetes jetzt
als Bild (bmp oder jpg) speichern. bei einer bitmap datei kann ich da einfach savetofile schreiben und dann den namen des textes.

wie mache ich es aber mit einer image datei???

oder wenn ich das bild drucken will??


es wäre sehr nett wenn mir dies jemand beantworten könnte

danke im vorraus Robert :-D

MikeS 23. Feb 2004 21:02

Re: wie kann ich ein image speichern und drucken
 
es gibt zum beispiel

Delphi-Quellcode:
image1.picture.bitmap.savetofile();
vielleicht hilft dir das!

Markus K. 23. Feb 2004 21:04

Re: wie kann ich ein image speichern und drucken
 
Hallo Robertlu,
ich glaube mit folgenden Befehlen kann man ein Image speichern.
Delphi-Quellcode:
Image1.Picture.SaveToFile('c:\Eigene Dateien\Bild.bmp');
Das Image wieder laden geht wiefolgt.
Delphi-Quellcode:
Image1.Picture.LoadFromFile('c:\Eigene Dateien\Bild.bmp');
Tschüß Markus

Plague 23. Feb 2004 21:10

Re: wie kann ich ein image speichern und drucken
 
Ich würde es mit einem SavePictureDialog machen. Der Quelltext sieht dann wie folgt aus:

Delphi-Quellcode:
begin
SavePictureDialog1.Execute;
Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
end;
Dadurch kannst Du im laufenden Programm den Speicherort wählen.

MfG
Thomas

nailor 23. Feb 2004 21:10

Re: wie kann ich ein image speichern und drucken
 
und drucken:

Zitat:

Zitat von Die Hilfe
Printing graphic images from a Delphi application is a simple task. The only requirement for printing is that you add the Printers unit to the uses clause of the form that will call the printer. The Printers unit declares a printer object called Printer that has a canvas that represents the printed page.

To print a graphic image:

Copy the image to the printer's canvas.

You can use the printer's canvas just as you would any other canvas. In particular, that means you can copy the contents of a graphic object, such as a bitmap, to the printer directly.


Robertlu 23. Feb 2004 21:11

Re: wie kann ich ein image speichern und drucken
 
danke ich werds gleich mal ausprobieren.

ich freue mich über die schnelle antwort.


Gruss rob

nailor 23. Feb 2004 21:11

Re: wie kann ich ein image speichern und drucken
 
Zitat:

Zitat von Plague
Ich würde es mit einem SavePictureDialog machen. Der Quelltext sieht dann wie folgt aus:

Delphi-Quellcode:
begin
SavePictureDialog1.Execute;
Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
end;
Dadurch kannst Du im laufenden Programm den Speicherort wählen.

MfG
Thomas

noch ein if mehr nehmen, dass nicht gespeichert wird, wenn man auf abbrechen klickt

SiL_ 1. Jul 2007 15:37

Re: wie kann ich ein image speichern und drucken
 
Zitat:

Zitat von nailor

noch ein if mehr nehmen, dass nicht gespeichert wird, wenn man auf abbrechen klickt

Hallo

Sorry aber wenn ich das Thema wieder raushole aber wie meinst du das mit den 'if'?
MfG

DGL-luke 1. Jul 2007 15:44

Re: wie kann ich ein image speichern und drucken
 
Delphi-Quellcode:
begin
if SavePictureDialog1.Execute then
  Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
end;
So.

SiL_ 1. Jul 2007 16:14

Re: wie kann ich ein image speichern und drucken
 
joo super danke


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:15 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz