You are here

Post Rotate Crop

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
PostRotateCrop.zip14.98 KB

The attached zip file now includes a Python version of the Post Rotate Crop script. This runs very much faster than the Script-Fu version (which is also included in the zip file for those who don't have Python installed).

Whilst originally intended to be used following a rotation the script can also be used following
other transformations, such as perspective, scale and shear. The transparent areas added to the
image by the transformation are removed to leave an opaque rectangle.

The script provides options that determine how the resulting rectangle should be maximized.

If the opaque area of the image is significantly smaller than the image size it may be more
efficient to manually crop the image so that it is only slightly larger than the opaque area
and then run this script (particularly if using the Script-Fu version).

The script is accessed via Tools/Transform Tools/Post Rotate Crop

The script is not intended to work for opaque areas that include reflex angles.

The attached file includes the script (Script-Fu and Python versions) and a text file of instructions about its use.

There is a new version of the Straighten and Crop script that will use the Python version of the Post Rotate Crop script.

Please note:
There is a problem with GIMP 2.6 (at least up to and including V2.6.11) with the rotation performed using the Sinc (Lanczos3) algorithm. If this algorithm is used the Post Rotate Crop script will produce results that are not as expected. Unless the rotated image is to be cropped manually the Cubic interpolation algorithm should be used.

For more details of the problem see: https://bugzilla.gnome.org/show_bug.cgi?id=630298

Code License: 
GIMP Version: 
Scripting Engine: 
Subscribe to Comments for "Post Rotate Crop"