Page 1 of 1

[Android]TIdHTTP and ListBox

PostPosted: Tue Dec 06, 2016 7:50 am
by Lena
Hi.
How to add pictures to a ListBox from a remote host?
Is it necessary to use TIdHTTP cycle download image to a temporary file and then:
Item->ItemData->Bitmap->LoadFromFile (temporary file)
?

Re: [Android]TIdHTTP and ListBox

PostPosted: Tue Dec 06, 2016 1:37 pm
by rlebeau
Lena wrote:Is it necessary to use TIdHTTP cycle download image to a temporary file and then:
Item->ItemData->Bitmap->LoadFromFile (temporary file)
?


Yes, you need to download the image first. You can skip the temporary file, though. Have TIdHTTP download to a TStream instead of a file, and then you can use Bitmap.LoadFromStream().