Autor Beitrag
rami
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win XP, Linux (K)ubuntu
Delphi 2005 Personal (, PHP, HTML, MySQL, ...)
BeitragVerfasst: Mi 02.04.08 17:13 
Ich habe PNGImage gemäß "help.chm" installiert aber die TImage-Komponente kann noch kein png. (Delphi 2005PE)
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Fr 04.04.08 14:16 
Hi,

(1) Du musst das png zur runtime laden, im OI geht das afaik leider nicht
(2) Du musst PNGImage in die uses mit einbinden

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Fr 04.04.08 15:21 
user profile iconXion hat folgendes geschrieben:
Du musst das png zur runtime laden, im OI geht das afaik leider nicht

Ich weiß nicht, wie das bei Delphi 2005 ist, aber bei D7 erstelle ich oft PNGs zur Entwurfszeit.

Am Ende der Unit "pngimage.pas" müsste folgende Codezeile sein:

ausblenden Delphi-Quelltext
1:
2:
initialization
  TPicture.RegisterFileFormat('PNG''Portable Network Graphics', TPNGObject);

Die fügt dem Bild-Öffnen-Dialog den Dateityp ".png" hinzu. Du musst IMHO noch "Komponente > Komponente Installieren > OK" wählen (pngimage.pas geöffnet), um den Dateityp hinzuzufügen.
rami Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win XP, Linux (K)ubuntu
Delphi 2005 Personal (, PHP, HTML, MySQL, ...)
BeitragVerfasst: Fr 04.04.08 22:13 
Ins uses eingebunden. Und wie erstelle ich eien PNG "zur Laufzeit"? also Picture1.Picture = '???';
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Fr 04.04.08 22:21 
user profile iconrami hat folgendes geschrieben:
Ins uses eingebunden.

Hast du auch den Schritt mit "Komponente Installieren" von mir gemacht? Wenn nicht, solltest du das mal ausprobieren.
rami Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win XP, Linux (K)ubuntu
Delphi 2005 Personal (, PHP, HTML, MySQL, ...)
BeitragVerfasst: Fr 04.04.08 22:34 
In 05 kann ich nur Packages installieren :(
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 05.04.08 13:22 
user profile iconrami hat folgendes geschrieben:
Ins uses eingebunden. Und wie erstelle ich eien PNG "zur Laufzeit"? also Picture1.Picture = '???';


ausblenden Delphi-Quelltext
1:
Image1.Picture.LoadfromFile('C:\blub.png');					

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)