trim sides of image rect if white
iMP
rooster at drizzle.com
Fri Aug 13 03:36:25 EDT 2004
Hi:
I generate a variable image in a white area of a card within a known
rectangle. I would like to save this area to a jpg file, but with the
left and right sides trimmed of any extra white space. The rule would
be "if all the pixels from top to bottom are white, then trim that
'column' of pixels." I want to start from the left and the right
sides and work to the center of the rectangle, deleting all columns
that have only white pixels, stopping when I hit a colored pixel. The
height should not be affected.
Has anybody already done this that they could share, or give me some
pointers on how to accomplish this? I hope I explained the problem
understandably!
Many thanks,
guy
More information about the use-livecode
mailing list