Image Remove Perimeter White Space

J. Landman Gay jacque at
Wed Dec 26 19:11:15 EST 2018

On 12/26/18 5:13 PM, Ralph DiMola via use-livecode wrote:
> I am downloading various images from a customer with varying unpredictable
> amount of white space around the image. I want to make the visible center
> portion images the same size. Before I start coding is there any native LC
> way or existing example stacks that do this?

If you mean to make all the images the same size and you aren't 
concerned about leaving out some content, then I'd create a temporary 
graphic with the right dimensions, center it over the loc of the 
customer image, and then:

crop img "customerImg" to the rect of grc "tempGrc"

If you want all the content to display, you can resize the longer edge 
of the image proportionately to fit inside the crop rectangle before 
cropping it.

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the use-livecode mailing list