RE: Image Remove Perimeter White Space

2018-12-26 Thread Ralph DiMola via use-livecode
...@lists.runrev.com] On Behalf Of hh via use-livecode Sent: Wednesday, December 26, 2018 7:58 PM To: use-livecode@lists.runrev.com Cc: hh Subject: Re: Image Remove Perimeter White Space Here is a pure LC Script handler from one of my "early" images stacks. For large images this may become p

Re: Image Remove Perimeter White Space

2018-12-26 Thread hh via use-livecode
Here is a pure LC Script handler from one of my "early" images stacks. For large images this may become pretty slow... ## CROP image to opaque pixels on cropIt ft put the width of img ft into w; put the height of img ft into h put the maskdata of img ft into mData put numToByte(0) into

Re: Image Remove Perimeter White Space

2018-12-26 Thread hh via use-livecode
> Ralph wrote: > I will just have to go pixel by pixel and check > left, top, right and bottom sides for any non-zero > RGB and delete rows/columns until one of the sides > has an RGB that is not zero. Here is a comparison value for that. Using javascript from a hidden browser widget autocropping

RE: Image Remove Perimeter White Space

2018-12-26 Thread Ralph DiMola via use-livecode
Thanks All! I was not totally clear. The area around the visible center is transparent(not white). I need to do this invisibly in real-time without user interaction. Luckily all the images are square so I don't have to worry about keeping the aspect ratio intact. I will just have to go pixel by

Re: Image Remove Perimeter White Space

2018-12-26 Thread J. Landman Gay via use-livecode
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

Re: Image Remove Perimeter White Space

2018-12-26 Thread hh via use-livecode
> Ralph D.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. Assuming the white space around is symmetric, at least proportional to width and height, you

Re: Image Remove Perimeter White Space

2018-12-26 Thread Bob Sneidar via use-livecode
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