Cropping invisible images

Niggemann, Bernd Bernd.Niggemann at uni-wh.de
Wed Sep 25 06:10:41 EDT 2024


jbv wrote:
>"One more question : what happens to the imagedata
>when an image is resized ?
>For instance :
>
>   put width of img 1 into w
>   put height of img 1 into h
>   put w/h into tratio
>   set width of img 1 to 150
>   set height of img 1 to 150/tratio
>
>And then when you crop the image..."

imageData is always adapted to what the new dimensions are.
Either by changing width and height or cropping.
The length of the imageData is always
width * height * 4

Think of imageData as a long binary string that is wrapped around according to the width.

By changing dimensions of an image LC automatically adapts imageData to the new dimensions.

Kind regards
Bernd


More information about the use-livecode mailing list