[Gimp-user] I need to know how much was cropped with autocrop
David Gowers
00ai99 at gmail.com
Wed Aug 8 00:33:02 PDT 2007
> On 8/1/07, David Feinzeig <feinzeig at gmail.com> wrote:
> > I am writing a plugin that, among other things, autocrops an image. But, I
> > need to know how much was cropped from all four sides, to deal with
> > alignment issues. Any idea how I can do this?
> >
> > Thanks!
> > Dave
If you create a rectangular path that matches the image boundaries,
you can calculate the offset and amount cropped from the difference
between the corner coordinates of the path and the corner coordinates
of the layer.
OTOH if you're just autocropping a *layer*, not an image, you can just
compare image corners to layer corners.
HTH.
More information about the Gimp-user
mailing list