RSS/Atom feed Twitter
Site is read-only, email is disabled

I need to know how much was cropped with autocrop

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

7 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

I need to know how much was cropped with autocrop David Feinzeig 01 Aug 21:01
  I need to know how much was cropped with autocrop Jozef Legeny 08 Aug 09:21
   I need to know how much was cropped with autocrop David Gowers 08 Aug 09:33
    I need to know how much was cropped with autocrop saulgoode@flashingtwelve.brickfilms.com 08 Aug 16:40
I need to know how much was cropped with autocrop saulgoode@flashingtwelve.brickfilms.com 08 Aug 17:35
  I need to know how much was cropped with autocrop Sven Neumann 08 Aug 18:38
  I need to know how much was cropped with autocrop Akkana Peck 08 Aug 18:50
David Feinzeig
2007-08-01 21:01:01 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

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

Jozef Legeny
2007-08-08 09:21:57 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

maybe creating a layer = copy of the image size-way; make it invisible (that should avoid autocropping it) and then compare it's size and position with the cropped image.

On 8/1/07, David Feinzeig 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
_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

David Gowers
2007-08-08 09:33:02 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

On 8/1/07, David Feinzeig 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.

saulgoode@flashingtwelve.brickfilms.com
2007-08-08 16:40:45 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

On 8/1/07, David Gower wrote:

OTOH if you're just autocropping a *layer*, not an image, you can just compare image corners to layer corners.

While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?)

Based on this behavior, there is no real advantage (from a scripting standpoint; you still have to process each layer individually) to doing a crop image as opposed to a crop layer. By processing each layer individually, its boundary offsets and dimensions remain relative to the original image, easing the task of comparing their "before" and "after" values.

saulgoode@flashingtwelve.brickfilms.com
2007-08-08 17:35:06 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

On 8/1/07, David Gower wrote:

OTOH if you're just autocropping a *layer*, not an image, you can just compare image corners to layer corners.

While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?)

Based on this behavior, there is no real advantage (from a scripting standpoint; you still have to process each layer individually) to doing a crop image as opposed to a crop layer. By processing each layer individually, its boundary offsets and dimensions remain relative to the original image, easing the task of comparing their "before" and "after" values.

(My apologies to David Gowers for responding to the wrong e-mail address.)

Sven Neumann
2007-08-08 18:38:30 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

Hi,

On Wed, 2007-08-08 at 11:35 -0400, saulgoode@flashingtwelve.brickfilms.com wrote:

While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?)

No. That's what the plug-in does and it seems that's what the plug-in author wanted it to do.

Sven

Akkana Peck
2007-08-08 18:50:40 UTC (over 17 years ago)

I need to know how much was cropped with autocrop

saulgoode@flashingtwelve.brickfilms.com writes:

While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?)

If you want a plug-in that crops the image according to the contents of all layers, not just the active one, I have one: http://shallowsky.com/software/gimp/autocropall.c