Autor Beitrag
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 21.10.05 11:52 
Ich versuche momentan ein Diaschau-Tools für eine Bildergalerie auf meiner HP zu programmieren. Dabei sollen die Bilder nicht auf der Festplatte gespeichert werden. Ich hätte gern, dass immer ein Bild angezeigt wird, das vorhergehende, das davor, das darauffolgende und das Übernächste sollen schon im Arbeitsspeicher gespeichert sein. Wenn man nun ein anderes Bild anzeigt, soll erst mal das gepufferte angezeigt werden, und die neuen, zu puffernden Bilder geladen werden.
Wie aber mache ich es, dass man trotzdem noch das nächste gepufferte Bild anzeigen kann, das Programmm also nicht hängt?

Ich benutze die idhtttp-Komponente, um die Bilder auf dem I-Net zu laden.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Fr 21.10.05 12:57 
Also ich glaube Threads ist da nicht so der richtige weg.
Es müsste denke ich gehen wenn du da ein Array/ObjectList für ein paar MemoryStreams erstellst und diese dann lädst.
jakobwenzel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 21.10.05 13:02 
Ich glaub aber, dass das Programm hängt, wenn das neue Bild geladen wird, oder irre ich mich da?
Die Pufferung nützt ja nichts, wenn das Programm hängt, während das Bild geladen wird.:lol:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
jakobwenzel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 13.11.05 20:14 
Ich habs grad mal ausprobiert, das Programm hängt tatsächlich wärend der idHTTP.Get-Anfrage. Deshalb muss das Bild meiner Meinung nach in einem eigenen Thread geladen werden, damit das Programm nicht hängt, ich weiß aber nicht, wie man das macht. Kann mir jemand helfen?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 13.11.05 20:21 
Anderer Vorschlag: Lade die Bilder auf die Platte (nach und nach). Das spart Arbeitsspeicher, und du kannst sie leichter handeln.
jakobwenzel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 13.11.05 20:29 
Ich will sie aber gerade nicht auf die Platte laden. Ich will sie ohne Umwege aus dem Netz in dem Programm anzeigen.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: So 13.11.05 20:43 
Pack mal ein IdAntiFreeze auf dein Formular.

Gruß

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
jakobwenzel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 13.11.05 20:45 
Hängt auch mit idAntiFreeze. :?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
jakobwenzel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 13.11.05 22:14 
Ich habs! Application.ProcessMessages in idHTTP.OnWork. Muss ich nur ein bisschen aufpassen, dass er den einen Download nicht abbricht, um einen anderen zu starten.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.