EDIT: If all you want is the TBitmap, then you will find the TBitmap in TPicture. ie: if you load a JPEG/PNG, you access the TBitmap from TPicture. or, vice-versa. ie: If you load a bmp, you can save out jpeg. All that is already in TPicture.
The TPicture object in TImage will aready handle PNG, JPEG & BMP, so there is no need for conversion.
Im guessing, since you said "upload", that you want a function which will handle local and remote loading.
If so, then something like this:
uses StrUtils, fphttpclient;
procedure PictureLoadFromUrl(const APicture: TPicture; const AUrl: string);
var
LStream: TStream;
begin
if AnsiStartsText('http://', AUrl) then begin
LStream := TMemoryStream.Create;
try
TFPHTTPClient.SimpleGet(AUrl, LStream);
LStream.Position := 0;
APicture.LoadFromStream(LStream);
finally
FreeAndNil(LStream);
end;
end else begin
APicture.LoadFromFile(AUrl);
end;
end;
Note, this doesn't handle download progress. Todo that, I create a inherited TMemoryStream class which overrides TStream.Write(). This will allow you to monitor the size of the stream as its downloaded.