Loading image data from DB

Devin Asay devin_asay at byu.edu
Fri Apr 7 12:47:52 EDT 2006


On Apr 7, 2006, at 10:32 AM, Rob Cozens wrote:

>
> Devin,
>
>> The trick seems to be that you upload and download the image data  
>> as *text* (as opposed to the imageData of the image, which is  
>> binary.) I may have this all wrong conceptually, but that's how it  
>> finally made sense to me.
>
> An image's "Text" property is  binary data that comprises the  
> image.  The problem arises because, until one reads the Dictionary,  
> one might easily assume an image's Text property contains text,  
> just like a field.
>
> So, just as one might...
>
> 	get URL (("file:"&textFileName))
> 	put it into field "Main Text"
>
> one should be able to (untested)
>
> 	get URL (("binfile:"&imageFileName))
> 	put it into image "Main Image"

Which is essentially what I ended up doing, and it worked. Is it  
correct to assume that 'the text' is binary data expressed as ASCII  
text and data like 'the imageData' is "lower-level" code that can't  
be expressed visually in a meaningful way? Forgive my naive non- 
techie questions.

Am I correct in my understanding that these two statements are  
functionally identical:

	put myData into image "myImage"
	set the text of image "myImage" to myData

?

In other words, 'put' is simply shorthand for 'set the text of  
<object>'?

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list