If you unlock the image (set its lockloc to false) it will spring to its native size when its content changes. Then you can just read its width and height directly. If your scripts require a locked image, then in your import script:
Code: Select all
set the lockloc of img "myimage" to false
put url ("binfile:" & <path/to/image>) into img "myimage"
set the lockloc of img "myimage" to true
The image will automatically center itself at its previous location. Since it looks like all your images are located on a separate card, their positions probably won't matter.
The same applies to groups. Unlocked groups will naturally encompass their entire content. This may disrupt your group layout, depending on where the image is located, but sometimes it works.
The path you provide for an image filename or an image import will be relative to the defaultfolder unless you provide a full path. If you use "images/myimage.png" and you haven't set the defaultfolder, the engine will look for your image in the current defaultfolder, which is the one holding the LiveCode application. The easiest way to get that path to work is to set the defaultfolder to same one holding the images before trying to import.