Setting image source of fld char to remote URL
hh
hh at hyperhh.de
Sat Jul 22 16:16:58 EDT 2017
Browser widget:
Use a HTML-file and set the URL of the widget to that file.
Setting the htmltext alone in order to get an image from a server
usually doesn't work (what is the same with all browsers, this is
not LC-special). If you wish to work with the image, you may have
to respect the same-origin-policy.
Imagesource:
To display an image from URL <imageURL> (on a server) in a field,
for example at size 80x60 at char 42:
1. create invisible img "i1"
2. set the filename of img "i1" to <imageURL>
[You can access by that the formattedWidth and formattedHeight].
3. set the width of img "i1" to 80; set the height of img "i1" to 60
4. set the imagesource of char 42 of fld 1 to "i1"
There are also examples in "Sample stacks" for using javascript and
canvas2d. But this gives, TMHO, no advantage advantage here, only
increases datasize by 30% by using base64.
More information about the use-livecode
mailing list