[Gllug] Image cropping from a script
Fred Youhanaie
fly at anydata.co.uk
Wed Jul 4 17:52:49 UTC 2007
> Sorry, I should have said I want the smallest possible rectangle that
> contains *all* the pixels of a given colour in the image.
>
The smallest rectangle is still going to be 1x1 pixel, but if you meant
largest rectangle, I think the GIMP autocrop might help you here, below
is an extract from the manual:
==============
"Autocrop Image" removes borders from an image. It searches the active
layer for the largest possible border area that all has the same color,
and then crops this area from the image, just as though you had used the
Crop tool.
==============
Perhaps you can use GIMP it in batch mode in your script.
HTH
Cheers
f.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list