Hi,
How to view .tif i have tried picture control and webbrowser with no success.
p_1.PictureName = 'https//xxxxxxxxxxx/name.tif'
wb_1= 'https//xxxxxxxxxxx/name.tif'
Hi,
How to view .tif i have tried picture control and webbrowser with no success.
p_1.PictureName = 'https//xxxxxxxxxxx/name.tif'
wb_1= 'https//xxxxxxxxxxx/name.tif'
From some tests I did, I see that readdata fails... It's a shame... GetResponseBody seems to get the beginning of the result, but not all the response. I guess it's related to the content sent. It starts with "II*" and followed some special characters but everything after "II*" is truncated (I guess some null?)...
It's a shame because curl can download and save the tiff to a file. But I cannot read the file using fileopen (probably due to the reason mentioned before)...
But this works for me:
long ll_fileno
string ls_command = "curl http://localhost/aaa.tif -o ", ls_filename = "C:\SomePath\aaa.tif"
run(ls_command + ls_filename, minimized!)
// I put some delay to be sure that the file is downloaded.
// Instead you could use Roland's Smith RunAndWait (https://www.topwizprogramming.com/freecode_runandwait.html).
sleep(1)
ip_1.LoadPicture(ls_filename)
// The image is deleted after loading.
if fileexists(ls_filename) then filedelete(ls_filename)
Andreas.
It has worked i am happy.
This may help some-else
Blob lblb_photo, lblb_NextData
HttpClient lnv_HttpClient
string ls_response
lnv_HttpClient = Create HttpClient
// Not to read data automatically after sending request (default is true)
lnv_HttpClient.AutoReadData = false
// Send request using GET method
li_rc = lnv_HttpClient.SendRequest("GET", "url link")
lnv_HttpClient.GetResponseBody(ls_response)
messagebox('',ls_response)
// Receive large data
if li_rc = 1 and lnv_HttpClient.GetResponseStatusCode() = 200 then
do while true
li_rc = lnv_HttpClient.ReadData(lblb_NextData, 1024*16)
if li_rc = 0 then exit // Finish receiving data
if li_rc = -1 then exit // Error occurred
lblb_photo += lblb_NextData
loop
end if
ip_2.LoadPicture(lblb_photo)
Hi.
In your example you are missing a ":" char.
p_1.PictureName = 'https://xxxxxxxxxxx/name.tif'
Picture controls do not have support for tif. If you absolutely need to display a tif image file, then try using webbrowser control or inkpicture control...
Andreas.