Hi,
I use the following to load a graph image from my website:
put "http://www.myweb.com/pic/graph.png" into tImageURL
put URL tImageURL into image "Graph"
The graph size is only 13 KB and load very fast in browser, usually within a second. However it always fail to load into my RR project. It seems that RR get the image much much slower than browser.
Any methods to ensure getting the image and faster?
Actually I tried a stupid method to get the image as below:
put "http://www.myweb.com/pic/graph.png" into tImageURL
Repeat for 3 times
put URL tImageURL into image "Graph"
if the size of image "Graph" = 0 then
wait 1.5 seconds
else
exit repeat
end if
End Repeat
However the graph is still always fail to load into image "graph".
Please help.
Thanks and best regards
Any good method to put image from Internet to RR stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Any good method to put image from Internet to RR stack?
Alex
Nice to meet all of you.
Nice to meet all of you.
Hi Alex,
What is the problem? Does the image load slowly, but it appears eventually? Or doesn't it appear at all?
You might want to set the text of the image object to URL <url>. For example:
set the text of img 1 to url "http://forums.runrev.com/phpBB2/templat ... _phpBB.gif"
Best,
Mark
What is the problem? Does the image load slowly, but it appears eventually? Or doesn't it appear at all?
You might want to set the text of the image object to URL <url>. For example:
set the text of img 1 to url "http://forums.runrev.com/phpBB2/templat ... _phpBB.gif"
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Alex,
Are you sure that it is the downloading that takes time? Perhaps you should do it in two steps. First download the picture and then set the text of the image.
The message box will show you the time in milliseconds, the time needed to finish the repeat loop and the time to set the imagedata. Which part takes the most time?
Best,
Mark
Are you sure that it is the downloading that takes time? Perhaps you should do it in two steps. First download the picture and then set the text of the image.
Code: Select all
put the millisecs into myTime
repeat 3
put url "http://forums.runrev.com/phpBB2/templates/subSilver/images/logo_phpBB.gif" into myImage
if the result is empty then exit repeat
end repeat
put myTime & cr & (the millisecs - myTime) & cr
put the millisecs into myTime
set the text of img 1 to myImage
put the millisecs - myTime after msg
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Mark,
It works very fast for thel ogo_phpBB.gif. The times are:
*****************
1180234342763
47
3
*****************
However when I wish to load the .png image from a website. The image sometimes appear and sometimes do not appear. The times when appear are:
*******************
1180234751145
136
18
*******************
and
*******************
1180234897096
231
17
*******************
The time when not appear are:
*******************
1180234503479
172
0
*******************
and
*******************
1180234862061
235
2
*******************
Any idea why this happens? The website is working normally.
Best regards
It works very fast for thel ogo_phpBB.gif. The times are:
*****************
1180234342763
47
3
*****************
However when I wish to load the .png image from a website. The image sometimes appear and sometimes do not appear. The times when appear are:
*******************
1180234751145
136
18
*******************
and
*******************
1180234897096
231
17
*******************
The time when not appear are:
*******************
1180234503479
172
0
*******************
and
*******************
1180234862061
235
2
*******************
Any idea why this happens? The website is working normally.
Best regards
Alex
Nice to meet all of you.
Nice to meet all of you.