Image Remove Perimeter White Space

Bob Sneidar bobsneidar at iotecdigital.com
Wed Dec 26 18:23:35 EST 2018


Oh that's a pickle! Nothing native I'm sure. There is no telling from the image itself that you want "white" to equal "overlap" at least not without a mask of some sort. So it's going to be a pixel by pixel job, and then hope and pray that "white" actually means "0,0,0" as opposed to "1,0,0" or anything else. If the image was produced taking into account any kind of color workflow, that will likely not be the case. 

I suppose a better way would be to provide the end user with some kind of crop tool and let them draw and scale a transparent rectangle with visible border and handles, then crop the imported image accordingly. 

Alternatively just require the user to provide images of a maximum width and height, then alert the user if they select something which exceeds the parameters. That is not unusual to expect that from end users. For instance, Toshiba's new Elevate Web Portal allow the importing of a background image and a company logo, but the logo must be no larger than 256x256 and the background must be exactly a certain size. Toshiba has no compunction requiring us to follow those guidelines. 

Bob S


> On Dec 26, 2018, at 15:13 , Ralph DiMola via use-livecode <use-livecode at lists.runrev.com> 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?
> 
> Thanks!
> 
> Ralph DiMola





More information about the use-livecode mailing list