putting files into images

Edwin Gore edgore at shinra.com
Thu Jul 31 10:39:01 EDT 2003


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"
  put image "first" into image "second"

end mouseup



More information about the use-livecode mailing list