Forum > Networking and Web Programming
How to load a picture from the Internet?
Vlad1997:
How to load a picture from the Internet?
Formats: BMP, JPEG and GIF.
OS: Ubuntu
skalogryz:
Please, review examples and documentation of the following component: http://wiki.freepascal.org/lNet
Vlad1997:
And how to use it?
skalogryz:
have you tried any of lnet examples?
http://svn.freepascal.org/svn/fpcprojects/lnet/trunk/examples/visual/
Vlad1997:
Thank you :)
And how to load just picture?
--- Code: ---function TMainForm.HTTPClientInput(ASocket: TLHTTPClientSocket; ABuffer: pchar;
ASize: dword): dword;
var
oldLength: dword;
begin
oldLength := Length(HTTPBuffer);
setlength(HTTPBuffer,oldLength + ASize);
move(ABuffer^,HTTPBuffer[oldLength + 1], ASize);
MemoHTML.Text := HTTPBuffer;
MemoHTML.SelStart := Length(HTTPBuffer);
AppendToMemo(MemoStatus, IntToStr(ASize) + '...');
Result := aSize; // tell the http buffer we read it all
end;
--- End code ---
Navigation
[0] Message Index
[#] Next page