Autor Beitrag
gasser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51

W7
Delphi XE
BeitragVerfasst: So 23.02.03 10:46 
Hallo Bildverarbeiter
Ich schreibe eine Applikation, in der Personal verwaltet wird (unter anderem). Im Personalstamm habe ich der Haupttabelle zwei BLOB's eingefügt (eines für ein Textfile das zweite für ein Photo). Das Textfile wird mit problemlos geöffnet und angezeigt :lol: beim Bildchen habe ich null Anzeige :cry:. Ich habe JPEG in die USES Klausel eingebunden. Zur Anzeige habe ich ein TDBImage gewählt. Wer kann mir konkret helfen, das Problem zu beheben.

Gruss
Hanspeter
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: So 23.02.03 16:53 
hi und willkommen

zum ersten, kannst du keine jpg in einer Timage oder DBImage anzeigen lassen, sondern nur .bmp
dito must du die jpg in eine bmp umwandeln dann geht das wunderbar :)

noch ein kleiner tipp am rande ... die erfahrung zeigt, das dateien in dbs nich das beste sind ... sondern nur die links zu den datein :) ist nur so ein tipp

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
kiwicht
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Mo 24.02.03 10:05 
also meines Erachtens ist es schon möglich auch Jpegs anzuzeigen... Bei mir jedenfalls klappt es.

Versuch mal folgendes: Lad doch mal "testweise" zur Entwicklungs-Zeit deines Proggs in deine Image-Komponente ein Jpeg-Bild und kompiliere. Dann nimm das Bild wieder raus, und lasse dynamisch nachladen, so wie du es ursprünglich vorhattest.

Klappt das auch nicht, poste doch mal den Code, vielleicht lässt sich da was feststellen...

mfg
kiwicht
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Mo 24.02.03 10:10 
also kiwich
ich hätte auf meine Finger schwören können, dass das nich geht :rofl:

aber ok wenns bei dir geht ....

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
kiwicht
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Mo 24.02.03 22:00 
naja, ich kanns auch nicht wirklich erklären. es hat dann halt einfach funktioniert..... ;) ich sag mal so: magie! :D :D
gasser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51

W7
Delphi XE
BeitragVerfasst: Mi 26.02.03 20:28 
Titel: Es hat funktioniert
Das einbinden eines JPG.Files in DELPHI (5) funktioniert. Dargestellt wird es in einem normalen TImage. nachstehend der Code.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.BitBtn1Click(Sender: TObject);
Var
  vArtikelBild    : string;
  ExtractFilePath : string;{wird aus System Tabelle ausgelesen, sobald vorhanden}
begin
  vArtikelBild := DataModule1.T_PERS.FieldByName('VORNAME').AsString
                + ' '
                + DataModule1.T_PERS.FieldByName('NAME').AsString
                + '.JPG';
  if FileExists(vArtikelBild)
    then
      Image1.Picture.LoadFromFile(vArtikelBild)
    else
      Image1.Picture.LoadFromFile(ExtractFilePath +'nopic.jpg');
end;
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 26.02.03 21:13 
Titel: Re: Es hat funktioniert
Hi,

procedure TForm1.BitBtn1Click(Sender: TObject);
..
ExtractFilePath : string.
..
(ExtractFilePath +'nopic.jpg');
end

bischen grob, eigene Variablen definieren die mit Funktionen aus der Laufzeitbibliothek zumindest namentlich identisch sind.

Vielleicht liegt da der Fehler
Grüße
MSCH
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 26.02.03 21:14 
Titel: Re: Es hat funktioniert
Hi,

procedure TForm1.BitBtn1Click(Sender: TObject);
..
ExtractFilePath : string.
..
(ExtractFilePath +'nopic.jpg');
end

bischen grob, eigene Variablen definieren die mit Funktionen aus der Laufzeitbibliothek zumindest namentlich identisch sind.

Vielleicht liegt da der Fehler
Grüße
MSCH
gasser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51

W7
Delphi XE
BeitragVerfasst: Do 27.02.03 08:05 
Titel: ich habs gemerkt
ich habs gemerkt. diese variable gehört nicht rein. da ich noch keinen string übergeben hatte, blieb der fehler unbemerkt. ohne dies funktionierts aber tadellos.

gruss und schönen tag
hanspeter