MJW

Unselected Rectangle Keeper

6 posts in this topic

This is a plugin I wrote a while ago, which I posted to a thread titled crop black and white images down to the smallest rectangular size that contains the black part.  Apparently inspired by the thread's title, I chose the rather awkward name Unselected Rectangle Keeper. It's in the Selection submenu.  It has no user interface.

 

This is the plugin: UnselectedRectangleKeeper.zip

 

The icon: UnselectedRectangleKeeper.png

 

What it does sounds kind of strange, but is useful for cropping images to the smallest region that doesn't match the surrounding color.

 

If you have a rectangular selection which contains a non-selected region, it erases everything in the selection that's outside the bounding rectangle of the non-selected region:

 

To crop to the smallest rectangle containing something not matching the color of the background:

Use the Magic Wand with a low tolerance to select the outside color.

Run Unselected Rectangle Keeper.

Deselect.

Use the Magic Wand to select the transparent region.

Invert the selection.

Crop to the selection.

 

Example:

 

Before (white region is selected).

UnselectedRectangeKeeperBefore_zpsdihyid

 

After.

UnselectedRectangeKeeperAfter_zpsanywvxn

 

 

EDIT: Added link to plugin (which I completely forgot to do). Thanks for the reminder, lynxster4!

 

4

Share this post


Link to post
Share on other sites

@MJW....maybe you should post the zip file above, so everyone doesn't have to go the link you provided?

They can go to the link for more information.  :)

1

Share this post


Link to post
Share on other sites

<3@MJW

 

Thank you so much for the plugin and your effort. :coffee::cake: or :beer::pizza:  ;)

Sorry! Rep. is tomorrow.

0

Share this post


Link to post
Share on other sites

<3Dear @Maximilian!

 

Thank you also for your effort. Sorry! Rep. is tomorrow. :coffee::cake:

1

Share this post


Link to post
Share on other sites

Thank you, dear Seerose. Your kindness is much appreciated <3 👍

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now