crop image

jbv at souslelogo.com jbv at souslelogo.com
Tue Jul 23 09:23:11 EDT 2024


Hi list,

I have the following script :

  create image
  put number of imgs into ni
  put id of img ni into tid
  set filename of img id tid to myFile
  put imageData of img id tid into pimage
-- many lines for imagedata analysis
  crop image id tid to rect trect

I get this error :
  crop: object is not an image

However, when replacing the "crop..." line with
  select img id tid
it works, the image is visible and selected,
which means the image has been created.

It is as if "crop" doesn't work for images created in
the same script. I have tried with an image created
before running the script, and it works.

I also tried a workaround with "export snapshot" = it
works, also the snapshot features the portion of the card
behind the image, as if the image doesn't exist...

Any idea ?
I am using LC 9.6.9 on Mac 10.15.
Thank you in advance.
jbv



More information about the use-livecode mailing list