Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,767
» Latest member: litstiGup
» Forum threads: 6,976
» Forum posts: 38,102

Full Statistics

Latest Threads
stylus doesn't draw lines
Forum: General questions
Last Post: Ofnuts
1 hour ago
» Replies: 1
» Views: 39
Controlling Hue Chroma ?
Forum: Scripting questions
Last Post: Ofnuts
1 hour ago
» Replies: 2
» Views: 105
Resize and convert a SVG ...
Forum: Scripting questions
Last Post: Ofnuts
1 hour ago
» Replies: 8
» Views: 334
emergent chaos or entrail...
Forum: Gallery
Last Post: MJ Barmish
7 hours ago
» Replies: 0
» Views: 38
autumnal sunset (particul...
Forum: Gallery
Last Post: MJ Barmish
7 hours ago
» Replies: 0
» Views: 35
My Gimp 3.0 Plug-in (grou...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: Ofnuts
8 hours ago
» Replies: 7
» Views: 201
Is layer Composite Space ...
Forum: General questions
Last Post: jez9999
11 hours ago
» Replies: 4
» Views: 178
Change Default Text
Forum: General questions
Last Post: rich2005
Yesterday, 10:00 AM
» Replies: 3
» Views: 133
Gimp 3.0.0. rc1 AppImage
Forum: Alternate Gimp packagings
Last Post: Tas_mania
Yesterday, 01:01 AM
» Replies: 13
» Views: 491
non-destructive filter no...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
11-14-2024, 12:24 PM
» Replies: 2
» Views: 119

 
  Cropping and slicing a path
Posted by: Ottia Tuota - 10-09-2020, 11:31 AM - Forum: Extending the GIMP - Replies (29)

I made a plugin to crop a path, similar to cropping an image or a layer. I don't know any such tool in Gimp previously, but what I know about Gimp is very limited, so please enlighten me if I am wrong.

Actually I made four plugins, two for cropping, two for slicing:

  1. Crop path by convex polygon
  2. Crop path by rectangle
  3. Slice path by guides
  4. Slice path by lines
Numbers 2 and 3 are the main plugins, that is, I expect them to be the most used. The other two came as by-products.

To get the plugins, go to Cropping and slicing a path, scroll to the bottom, and click the download button. You get a zip file. Unzip it and place the one file it contains (crop_path.py) in your user's plug-ins folder. Then (re)start Gimp.

To invoke the plugins, go to the Paths tab, right-click some path and follow the link
Tools > Cropping and slicing > ...

I explain now the plugins. They are very simple to use (quite an achievement from me).

Crop path by rectangle takes as input a path (the right-clicked one) and it allows four choices for the cropping rectangle:
  1. a rectangular selection
  2. four guides (two horizontal, two vertical)
  3. image (canvas)
  4. the active layer.
The first option (selection) allows in fact any selection, not only rectangular, but only its bounding box is used. In this sense it works just in the same way as the usual tool Image > Crop to selection works for images.

The second option (guides) requires that no other guides exist.

   

Crop path by convex polygon works similarly except that instead of a rectangle the cropping region is a convex polygon. The polygon is inputted as a path: closed, with straight edges, enclosing a convex region. ("Convex" means that all corners jut outwards.) Of the polygon path only anchors are taken into account; all curviness is ignored.

   

Then the two slicing plugins:

Slice path by lines takes as input two paths. One is the source path to be sliced (the right-clicked one), and the other is supposed to be a set of straight line segments, one line segment per stroke. Of each stroke the first two anchors are read and used to determine a line. You can think that each stroke is supposed to be a 2-anchor path, a straight line segment. Note that the line segments may be short, but the plugin sees and uses them as full infinite lines.

If the slicing path has only one stroke (only one slicing line), the source path is split into two parts. This is the situation in the following picture. For this picture, I moved the two halves of the result slightly apart just so that you can see what happened.

   

What happens here is more precisely the following. The path is splitted into two parts. Two new paths are created: if the original path has name 'path', the new ones will probably be 'path|slice' and 'path|slice #1'. If either of them is empty, it is discarded (not inserted in Gimp). But in some cases an additional new path is created. Namely, if the original path contains straight line segments which lie flat on the slicing line, there is no way to tell to which side they belong, so they are collected as a separate additional new path.

In the next picture the slicing path consists of three strokes (three slicing lines). Again I moved the sliced parts a little just to show the effect.

   

Slice path by guides works quite similarly except that the slicing lines are guides. You have the choice to use all guides in the image, or only horizontal guides, or only vertical guides.

A word of warning: The running time grows fast with the number of slicing lines (or guides). That is why I prevented the usage of more than 8 lines. Another advantage of this is that the number of created new paths also grows fast, and it is good to have some limit. If you want to change that number 8, find and edit in the code the line

MAX_SLICE_LINES = 8 # Maximum number of slicing lines allowed

But please, do not go over 10.

If you find some case where the plugins act strangely, please report. The code is a little messy, I admit, and I may have missed something.

Print this item

  Gimp 2.10.14 - text editor changing text size
Posted by: Accessdenied - 10-09-2020, 08:18 AM - Forum: General questions - Replies (6)

Hi!
Created simple business card. Some text boxes, one image. Saved. 
Now opened it and if I click on Text tool and then on text, it changes size. Cannot figure out how to edit text without damaging it's size. In layers it show as A - I guess as text layer. Right click on layer and Edit on canvas gives the same result.

Print this item

  gimp 2.10.22
Posted by: vpkumar - 10-09-2020, 03:18 AM - Forum: General questions - Replies (3)

I downloaded and ionstalled the latest Gimp 2.10.22 in windows 64.
However now I find all my scripts -Fu and python plug in are greyed out.
How do I restore all these scripts and plugins

I am sorry I found out that this was because I had not opened any imgae in Gimp. Once I opened an image everything was OK.

Print this item

  Hard edge removal with Brush/Texture
Posted by: jediguitar101@yahoo.com - 10-09-2020, 01:57 AM - Forum: General questions - Replies (2)

If I'm using a brush to erase/remove fragments/particles of an image, how can I get 100% removal of everything the brush touches? I don't want any "grey" transition fading left. I want to use a "splatter" brush to remove particles...completely.

Print this item

  GIMP 2.10 - Trouble Painting or Cloning On Top of Alpha
Posted by: TMORT - 10-09-2020, 01:14 AM - Forum: General questions - Replies (4)

I have picture I'm working on with several layers. There is an area of alpha, and a border around it on another layer and another layer has an image of some  leaves.  I'd there is a gap of alpha between the colored border and the leaves. I'd like paint or clone over the gap of alpha.

I've tried adding another layer, raising and lowering layers. It is just locked somehow. I've tried pressing the little chekerboard in the layers tool panel for each of them.

I've used GIMP for a number of years, and a number of features and tools, but only do a few now and then.  I never really use it enough to get proficient or retain how do things.

Print this item

  Copy channel from one image to another image.
Posted by: Krikor - 10-08-2020, 06:35 PM - Forum: General questions - Replies (6)

How can I to copy channel from one image to another image?

I have two images open. In one of them I created channels which I want to use in the second image as well.

How I do:
I select one of the created channels - Channel for selection.
From this selection I create a path - Select - To Path.
In the Paths tab, drag this created path over the thumbnail of the second image.
I open the second image, and now I reverse the operation, select the path and create a channel from that selection.

Is there another, faster and more efficient way to copy channels from one layer to another?

Thank you.

Print this item

  Resynthesize along a path
Posted by: denzjos - 10-08-2020, 04:31 PM - Forum: Extending the GIMP - No Replies

One from under the dust (tested on gimp 2.10.22 / windows 10). Easy erase cables, lines, etc....  : 

http://www.silent9.com/blog/archives/172...p-2.8.html
Original picture
   
Draw paths
   
Launch Resynthesize along a path, in gimp menu : right click on path layer, then Resynth along Path
Fil in the parameters
Width of the line to repair (= to erase object + a few pixels)
Radius to take texture from (= how much image info to take next to the object) 
   

Print this item

  can't get two blacks to match
Posted by: ottenm - 10-08-2020, 03:50 PM - Forum: General questions - Replies (2)

In this PNG of 5 tally marks, the 5th one (going across) is visibly blacker & shinier than the others.  I'd like it to match the other 4, but I'm struggling to figure out what the difference is. 

Just grabbing pixels with the eye-dropper both sets seem about the same, a mix of solid black and colors that are close to black.  I thought it might be the alpha values, but I tried Layer > Transparency > Threshold Alpha and at 99% there's still a noticeable difference between the pixels that are left.

Any help greatly appreciated.

https://ibb.co/T1DRhTH

Print this item

  No more official mastodon account?
Posted by: ChameleonScales - 10-08-2020, 10:59 AM - Forum: Watercooler - Replies (2)

There used to be an official GIMP account on mastodon but it seems the instance is gone (I think it was mastodon.at or something ending with .at)
Did they decide not to create another account?

Print this item

  Changing to a solid color
Posted by: RawlinsCross - 10-07-2020, 07:25 PM - Forum: General questions - Replies (2)

Good day everyone,

I have an image of a rain coat that I'd like to fill in with solid color.  You can see (link below) that it's a funky little design, but I'd like to fill it all in with a solid color.  Maybe leave the face alone but if that's too hard, then it can be filled in as well.

This is my real first foray into GIMP.  It obviously is very complicated and any start-up advice would be certainly appreciated.  I figure this one would be good to start off on?


Picture of Raincoat

Print this item