[Gllug] Image cropping from a script

- Tethys tethys at gmail.com
Wed Jul 4 17:09:41 UTC 2007


I need to be able to crop an image from within a script, such that the
resulting image is the smallest possible rectangle containing pixels
of a given foreground colour. Any ideas?

My first choice (netpbm) only seems to handle cropping to a given set
of dimensions, which must be known in advance, or removing a border of
a given colour. ImageMagick seems to fare no better, and even gimp,
which as a last resort can be scriptable, has nothing that I can find
to do it without human interaction.

Does any tool exist that already does what I want, or do I need to
write my own netpbm filter/gimp script?

Tet

-- 
Perl is like vise grips. You can do anything with it but it is the
wrong tool for every job. -- Bruce Eckel
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list