Autor Beitrag
DerHorst
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31

windows200
delphi 6 PE
BeitragVerfasst: Do 07.10.04 17:37 
grüß euch!

ich möchte die PNGUnit benutzen um png dateien die ich per indy http lade,als bmp darstellen und verändern kann.

leider unterstützt die PNGunit nicht den loadstream befehl (ich glaube es) damit ich ein bild direkt laden kann.

die pngunit verweden einen eigene png lade befehl um ein bild von der festplatte zu laden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
begin
  if OpenDialog1.Execute then
    if UpperCase(ExtractFileExt(OpenDialog1.Filename))='.PNG' then begin
      Bitmap1:=TBitmap.Create;
      ReadBitmapFromPngFile(OpenDialog1.Filename, Bitmap1);
      Image1.Picture.Bitmap.Assign(Bitmap1);
      Bitmap1.Free;
    end else Image1.Picture.Bitmap.LoadFromFile(OpenDialog1.Filename);
  //Image1.Invalidate;  
end;


gib es irgendeine möglichkeit es hinzubekomme das das bild aus dem memory per stream geladen wird?



grüße

horst
bms
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 735

Win XP
Delphi 3, Delphi 6 PE, Delphi 2005 PE
BeitragVerfasst: Do 07.10.04 18:53 
Welche Unit benutzt du? Link? Hast du die Pas Datei dazu?

Da Delphi so keine PNG Unit hat, hast du die wahrscheinlich aus dem Internet. Es ist also unbekannter Code.

_________________
VORSICHT: Ich behersche seit heute die Fünf-Finger-Handflächen-Herz-Explodier-Schlag-Kampf-Technik >:(
DerHorst Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31

windows200
delphi 6 PE
BeitragVerfasst: Do 07.10.04 22:32 
ja genau is ne externe unit.

ich habe sie mal hochgeladen. demo und pas sind drin.

www.crashforce.de/m/pngunit.zip


wäre super, wenn du mal reinschauen könntest


grüße

Michael
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 07.10.04 22:49 
Da kommst du nicht drum rum, dir ne eigene Klasse von TGraphic abzuleiten und das dort dann zu implementieren.

Guck dir dazu mal die Graphics.pas an. Dort ist das eigentlich ganz gut nachvollziehbar für die ganzen nativ von Delphi unterstützten Formate. (Delphi SRC benötigt).

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Neidhard von Reuental
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 268

XP
BDS 2006 Prof
BeitragVerfasst: Fr 08.10.04 15:47 
ach du kacke. bei deiner png-unit wird ja eine dll benötigt :roll:
hast du schon mal diese unit getestet pngdelphi.sourceforge.net/pngimage143.zip
mit dieser kannst du png's aus streams oder aus streamressourcen laden

gruss
neid
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Fr 08.10.04 22:42 
Hallo,

falls du später noch mehr Formate unterstützen möchtest, dann leg ich dir die Grafikbibliothek von Mike Lischke nahe:
www.soft-gems.net/Graphics.php.

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.