Loading images from a non-URL source

Klaus Major klaus at major-k.de
Tue Jul 20 16:51:09 EDT 2004


Hi Frank,

> How can I take binary image data stored in a variable (obtained 
> programmatically,
> usually from a database query) and display it in an image field 
> without first storing
> it to a file?  I can't seem to find any information on this.
>
> I tried this, but it doesn't seem to work:
>
> set the fileName of image "Logo" to empty
> set the imageData of image "Logo" to an_obtained_value

when using "the imagedata" you have to make sure that the "target" 
image has EXACTLY
the same dimensions as the "source" image, or you might expereince ugly 
results...

But you can:

...
put a_var_with_binary_data into img 1
...

and it will resize to the correct dimensions :-)

I use customproperties to store binary/image data (not "imagdata" ;-)
and never had any problems.

Hope that helps...

> Thank you!

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list