Gimp-Forum.net
ofn-enclosing-circle - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn-enclosing-circle (/Thread-ofn-enclosing-circle)

Pages: 1 2


ofn-enclosing-circle - Ofnuts - 01-04-2021

A plugin that determines the smallest circle that contains a shape, and does things with it.

[attachment=5433]

Still a bit experimental, use with caution and read the doc.

One use is to frame your avatar/logo in your image when you know that the "social" site is going to mercilessly crop it to a trendy circle that will make you miss an eye.

As usual, available here.


RE: ofn-enclosing-circle - Ofnuts - 01-05-2021

A typical use is cropping a photo for these sites that make your picture a circle. Very often the circle cuts an important part of the photo.  So you take your picture and selection your face in it (here, using the lasso tool):

[attachment=5438]

And then invoke the script on it. The script will find the smallest circle that contains your selection and crop your image to it, with an optional margin. It can also crop the image to the square that contains the circle. In both cases, when the web site autocrops your image, it will crop it to that circle so your selection will not be cut out.

[attachment=5437]



RE: ofn-enclosing-circle - Ofnuts - 01-06-2021

Works for other things of course:


[attachment=5439]
[attachment=5440]



RE: ofn-enclosing-circle - denzjos - 01-06-2021

Nice, the gimp plugin is working on my PC. It would also be nice to have an ellipse as result (vertical or horizontal) : 
My test image :
[attachment=5441]


RE: ofn-enclosing-circle - Ofnuts - 01-06-2021

(01-06-2021, 08:13 PM)denzjos Wrote: Nice, the gimp plugin is working on my PC. It would also be nice to have an ellipse as result (vertical or horizontal) : 
My test image :

The minimal circle is unique. Otherwise, which ellipse? What aspect ratio? What angle?


RE: ofn-enclosing-circle - Ofnuts - 01-07-2021

Updated.
  • Checks if circle extends outside canvas (selection and crop)
  • Add alpha channel when circle-cropping
  • Fix missing anchor that makes the circle cut a bit short at times.



RE: ofn-enclosing-circle - Krikor - 01-07-2021

This plugin really surprised me, much more versatile than I imagined.

At first it bothered me a little bit the fact that all layers are cropped and not just the selected one. 
But it is possible to use the path created to later crop only the desired layer, so ok.

I thought that if I made multiple selections that multiple crops could arise (in a single application of the plug-in), I saw that it is not possible.

But it is possible to concentrate the desired points in the image with multiple selections that the plug-in finds the best contour!
[attachment=5442]
Thx Ofnuts!


RE: ofn-enclosing-circle - denzjos - 01-07-2021

@Ofnuts. I was thinking for something like this (I know there are other ways make such selection). Just a thought.

[attachment=5443]


RE: ofn-enclosing-circle - Ofnuts - 01-07-2021

(01-07-2021, 09:21 AM)denzjos Wrote: @Ofnuts. I was thinking for something like this (I know there are other ways make such selection). Just a thought.

Of course, but which one do you want?

[attachment=5444]



RE: ofn-enclosing-circle - denzjos - 01-07-2021

This would be nice (thanks in advance):
[attachment=5445]