Autor Beitrag
Supernova
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: So 18.01.04 16:51 
Wie kann ich in mein Prog ein Gif Bild einbinden ( Es ist Transparent !!!)
und dass wenn ich mein Prog dann Komlimiere die tranparetz noch da ist !!!!!!!!!!!!!!

:::::::::::::SUPERNOVA
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 19.01.04 18:54 
Gif ist ein privates Format. In den aktuellen Delphi Versionen gibt es daher dafür noch keine Einbindung.

Vielleicht findest du bei [url=www.torry.net]Torry[/url] eine entsprechende Komponente.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 19.01.04 18:55 
Ich bin immer ganz gut mit Suche bei Google TGIFIMAGE gefahren.
espen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 90
Erhaltene Danke: 1


D6 Prof./D7 Prof. MSSQL, MySQL
BeitragVerfasst: Do 22.01.04 13:29 
Titel: So geht's ohne Komponente
Geht meiner Meinung auch mit *.bmp, *jpg, *.ico,
Image1 = TImage

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
uses axCtrls;
...

Procedure TfrmTest.LoadPic(aFileName : String);
var
  fs : TFileStream;
  olegraphic : TOleGraphic;
begin
  olegraphic := TOleGraphic.create;
  try
    fs := TFileStream.Create(aFileName, fmOpenRead or fmSharedenyNone);
    olegraphic.LoadFromStream(fs);
    Image1.Picture.Assign(olegraphic);
  finally
    fs.Free;
  end;
end;


Moderiert von user profile iconMotzi: Delphi-Tags hinzugefügt
MaxiTB
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 679

Win2000, WinXp, Workbench ;-)
D7 Ent, VS2003 Arch.
BeitragVerfasst: Do 22.01.04 14:24 
Titel: Grüße !
Entgegen allen anderen Tips würde ich dir folgende Sache empfehlen:

1) Verwendet doch keine altmodischen GIFs mehr ... die Limitierung auf 256 Farben wirkt wirklich meistens ziemlich alt.

2) Verwende wenn das Ding nicht verlustbehaftet komprimiert sein soll oder Transparenz besitzt das Windows Bitmap Format (BMP).

3) Für Transparenz eben den boolean auf gleichnamigen property des TImage.

4) Es wird hierbei aber das linke untere Pixel als Transparenzfarbe hergenommen - ist nicht schlimm; im blödesten Fall einfach eine (transparente) Pixelreihe anfügen.

Tjo, der Tip gilt eigentlich für alle Images, die du selber mitlieferst. Wenn du den User das verwenden von GIFs erlauben willst, kommst eh nicht um eine Compo hinweg. Aber ich persönlich verwende GIFs eigentlich nur mehr auf meiner page aber nicht in meinen Programmen.

_________________
Euer Mäxchen
Wer früher stirbt, ist länger tot.