crop image
Mark Waddingham
mark at livecode.com
Thu Jul 25 05:41:42 EDT 2024
On 2024-07-23 14:23, jbv via use-livecode wrote:
> 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
That is a slightly misleading error...
'crop' does not operate on images which are referenced - i.e. use a
filename
To crop such an image, load the data into the image:
set the text of img id tid to url ("binfile:" & myFile)
Hope this helps.
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things
More information about the use-livecode
mailing list