putting files into images

Klaus Major klaus at major-k.de
Thu Jul 31 10:51:00 EDT 2003


Hi Edwin,

> I'm confused. I am trying to run some tests to determine how images 
> are stored internally, but I am running into problems very early on.
>
> I created a test stack with two images - one called "first" and one 
> called "second". first's size and position is locked, second's is not.
>
> What my test was supposed to do was tell me whether putting an image 
> file into a locked and smaller image would actually resize the image, 
> or if the original image data was retained, and could be retrieved by 
> popping the image into an unlocked inage.
>
> But I can't even get that far. When I try to put an image from a file 
> into a control, the image remains blank. I think I am doing everything 
> as I am supposed to, and the image I am trying to import was actually 
> exported originally from RunRev.
>
> Below is the script I am using - I have tried every variation on # of 
> "/"s between "file:" and the path that I can think of (0-3).
>
> on mouseup
>   answer file empty with filter "JPEGs,*.jpg"
>
>   put it into theFile
>
>  if theFile is empty then
>     beep
>     exit mouseup
>   end if
>
>
>   put URL "file:" & theFile into image "first"

try:

  put URL "binfile:" & theFile into image "first"
## binfile... not file...

And see if it works...

>   put image "first" into image "second"
>
> end mouseup

Hope that helps.


Regards

Klaus Major
klaus at major-k.de
www.major-k.de




More information about the use-livecode mailing list