Loading images from a non-URL source
Klaus Major
klaus at major-k.de
Wed Jul 21 13:35:33 EDT 2004
Hi Frank,
here is a shorter one:
on mouseUp
answer file "Select an image file:" as sheet
if there is a file it then
put url("binfile:" & it) into image "Logo"
end if
end mouseUp
>> So then something like this attached to a button should work?
>> It doesn't seem to. I select a JPEG image file (I tried several
>> different ones).
>>
>> on mouseUp
>> answer file "Select an image file:" as sheet
>> put it into x
>> if there is a file x then
>> open file x
>> read from file x until EOF
>> put it into y
>> close file x
>> set the text of image "Logo" to y
>> end if
>> end mouseUp
>>
>> If I set the filename of image "Logo" to x, then the image appears,
>> but I need to be able to take the data from a database field (and to
>> take image data from a file and store it in the field), so I need
>> functionality similar to the above.
>>
>> What am I missing here?
Don't know...
But i have to confess that "the text of image xyz" just does not
"sound" right to me...
It is valid code actually, but i cannot like it. ;-)
Unfortunately i have never worked with BLOB data in databases, so i
cannot say
in what format images are stored there...
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list