Post Reply 

Cropping a Picture to regular pentagon

Jun 3, 2012, 15:46
Post: #1
Cropping a Picture to regular pentagon
I'd like to take my rectangular photo image and crop it to a pentagon shape prior to printing. This must be a regular pentagon, each side equal length (variable) and each internal angle 108 degrees (strictly).

Is there a way to do this in GIMP simply?

Thanks
Find all posts by this user
Quote this message in a reply
Jun 3, 2012, 17:18
Post: #2
RE: Cropping a Picture to regular pentagon
First method with an extra script everyone should have IMHO:

- Get/install the "shape-path" script: http://registry.gimp.org/node/59
- "Filters/Render/Shape paths/Polygon..."
- Define the pentagon (center, number of sides, radius, and maybe rotation). Do not stroke/fill. At that point, the only important characteristic is the number of sides, everything else can be adjusted later...
- This creates a Path (which isn't visible... open the Path list, and make it visible).
- You can use the Move/Scale/Rotate tools in Path mode to adjust the path size/position:
[attachment=1198]
- When satisfied, righ-ckick on path in Paths list, and "Path to selection"
- Invert selection
- Make sure the layer has an alpha channel
- [delete]

Of course, there is no such thing as a pentagonal image, there are only rectangular images with a non-transparent pentagonal area...

[attachment=1199]

Alternative method using a built-in tool I don't like much for various reasons:
- "Filters/Render/GFig"
- Create a pentagon and position it over the reduced-size image.
- Disable "stroke" and fill with color
- This should create another layer with the pentagon. Make it active.
- "Layer/Transparency/Alpha to selection", to create a pentagon shaped selection
- Remove/hide this layer
- Move to the image layer
- Invert selection
- Add alpha channel
- [delete]

I don't recommend this second method because:
- working with paths is more accurate
- you can't adjust the pentagon later without getting side effects (you'll be rotating/scaling the anti-aliasing pixels)

The day GFIG does paths I'll change my mind about it.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jun 4, 2012, 00:06
Post: #3
RE: Cropping a Picture to regular pentagon
Hmm. This might work but here are the issues:
1. I did download the shape path script 0.91 not the 0.7 before posting the question here.
2. It installed to my GIMP app. as a drop down menu item called: Script-FU between Filters and Windows.
3. Shape Paths does show up in that menu and “polygons” is a possible selection there.
4. I can enter a Center X value and a radius and 5 as number of sides and leave ‘stroke path’ and ‘fill path’ unchecked and click OK.
5. And it’s true, nothing happens.
6. “open the Path list and make it visible” . I don’t see a menu item called “path list” . That’s where I stalled out.
7. Any suggestions?
Find all posts by this user
Quote this message in a reply
Jun 4, 2012, 00:10
Post: #4
RE: Cropping a Picture to regular pentagon
See "Windows/Dockable dialog/Paths"

I think that in the standard Gimp set up, it shows up in tabs together with Layers and Channels, so you just have to select the tab...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Aug 31, 2012, 18:10
Post: #5
RE: Cropping a Picture to regular pentagon
In case this helps anyone else I went around and around making paths and having nothing show up. Then I figured out the numbers entered in the polygon shape are in pixels not inches. Thanks for the polygon script!
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Issue viewing GIMP-modified picture JuniorPear 1 340 Jul 6, 2017 05:03
Last Post: ythgilb
  resizing picture to make 1x2 inch jewelry soulstealer82 1 494 Apr 5, 2014 19:41
Last Post: ofnuts
  how to fix this picture taken of a screen moltres_rider 4 620 Nov 3, 2013 20:56
Last Post: ofnuts
Question How can I blend two layers to make the picture look more natural? Picture included. LiraelPayne 2 754 Sep 22, 2013 21:20
Last Post: iForStyle007
  Exporting a circle into a new picture. shiningknight 4 829 Jul 23, 2013 15:00
Last Post: shiningknight

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS