Welcome, Guest |
You have to register before you can post on our site.
|
|
|
Joining strokes of a path |
Posted by: Ottia Tuota - 07-19-2021, 10:57 AM - Forum: Extending the GIMP
- Replies (3)
|
 |
I made a small plugin to join strokes of a path. Only after finishing it I found that Ofnuts has an older plugin for the same purpose. But somehow, I was not very much surprised... But my plugin has different features, so I guess its publication is justified. Ofnuts' plugin is in his collection ofn-path-edits.
Suppose you have a path with several strokes as here on the left:
Some strokes have an end close to an end of another stroke. This plugin enables you to join such pairs of strokes, as is done on the right.
In this example I deliberately made the path such that the stroke ends are not so very close, just to show the effect clearly.
But suppose you have two strokes whose ends are practically at the same spot. Then you might really want to join the strokes into one. Or you have one stroke which is not closed but should be and its end anchors are at the same spot. This plugin closes the stroke properly.
To get the plugin, go to
http://kmarkku.arkku.net/Path_modify_fil...aster.html
scroll to the bottom, and click the right download button ("Join strokes"). You get a zip file. Unzip it and place the one file it contains (join_strokes.py) in your user's plug-ins folder. Then (re)start Gimp. To use the plugin: in the Paths tab, right-click a path and follow the links Tools > Modify path > Join strokes.
I envision two cases where this plugin might be useful. First, suppose you are working with a picture where you want to extract an object. And you do it with the path tool, tracing around the object. You get a long path consisting of a large number of closely spaced anchors. And then somewhere along the way you left accidently small gaps. With this plugin you can close the gaps and get one long stroke. (At least if everything goes well: The plugin does not know which anchors belong together; it works only by distances.) I just wonder if there is some old tool for this task too...
Second, you can build a figure from several strokes and afterwards join the strokes to one. The idea is the same as in Ofnuts' documentation for his plugin (as I later found out). I made the small path on the left.
Then I copied and flipped it three times. Using guides (shown here) I moved the 4 paths to the positions on the right. Then I merged the 4 paths. Now I had one path with 4 strokes, forming one figure. The stroke ends were practically on top of each other. Then I called my plugin. It joined the 4 strokes to one closed stroke.
The plugin lets you decide how close stroke ends are joined together. The default distance is 0.5 pixels. In the first picture above I used 40 pixels.
The plugin allows you to decide how the joining is done: either by replacing two anchors with one new anchor; or putting there a small smooth arc; or putting there a small straight edge. Here is an example of each:
The plugin also allows you to use a selection to restrict the effect to only some stroke ends.
Please report any erronous functionings. All suggestions are welcome.
|
|
|
flickering colors and tools bug |
Posted by: NightHare - 07-18-2021, 07:40 PM - Forum: General questions
- Replies (3)
|
 |
hello everyone
I usually manage to troubleshoot on my own by searching on the internet
but I'm comming here because I really don't know what to do anymore ;-;
gimp sometimes freaks out, switching tools back and forth when (for example) I hit the edges of a toolbox
it started doing this around version 2.8 or 2.6(?)
I used to click on tools to reset the behaviour and go back at drawing
it wasn't something I couldn't work around
but now, it came to a point I absolutely cant draw anymore
I do 2 strokes, and suddenly the brush start flickering between colors and tools
it also fixates on the tool options doing that highlight
as if there's something important for me to check there
I tried:
- uninstalling and reinstalling gimp
- same for the tablet driver
- preferences>tool options>reset saved tool options to default values
- preferences>input devices>reset saved tool options to default values
- turning off my mouse and touchpad in case they were interfering
- deleting the gimp folder in my %appdata% to get rid any 'user profile' info
- and ofc I restarted my pc multiple times while trying all these things..
I tought maybe my tablet died... so I bought a new one which didn't arrived yet..
but then I tried using my friend's tablet to see if the problem would solve- nope! the issue is the same!
I tought maybe it's my pc's issue so I tried installing krita and see if the issue happens there (using my old tablet)... and nope!
I can work on krita just fine!
so I'm considering to abandon Gimp...
but I've grown using only Gimp since 2008 ..it's frustrating..
thank you so much for your time and attention <3<3
(sorry for any spelling mistake, english isn't my first language)
_____
PC and tablet info:
old tablet: Wacom Bamboo CTL-470
new incoming tablet: Wacom One Small
PC: Omen 15-dc
Processor Intel® Core i7-8750H CPU @ 2.20GHz 2.21 GHz
Installed RAM 16.0 GB (15.9 GB usable)
System type 64-bit operating system, x64-based processor
|
|
|
Numpy slicing problem |
Posted by: Zero01 - 07-18-2021, 04:21 PM - Forum: Other graphics software
- Replies (3)
|
 |
Code:
import numpy as np
a = np.concatenate((np.linspace(10,200,25),np.geomspace(200,360,25)))
b = np.concatenate((np.linspace(20,-180,25),np.linspace(-180,230,25)))
c = a[0]+(b[0])/np.pi
if c >= 360:
c = 360
d= a[3]+(b[3])/np.pi
if d >= 360:
d = 360
e = np.linspace(c,d,50)
f = open("new.txt","w")
for i in range(50):
f.write("gmic someFilter params: "+str(a[i])+","+str(b[i])+","+str(e[i])+" -o somefiles%04d.file \n" % i)
f.close()
Tryin to get it so that in all 50 outputs to the text file, the value of 'e' is: a + b / pi (or 360 if e >= 360).
First output seems ok i.e.: gmic someFilter params: 10.0,20.0,16.366197723675814 -o somefiles0000.file
but subsequent values are messed up, i.e. the last one: gmic someFilter params: 360.0,230.0,32.15845056908105 -o somefiles0049.file
.. the value of 'e' in this case should be about 82, not 32..
My slicing is probably the issue as I've no experience doing this, any help gratefully received.
cheers!
|
|
|
Layer Problem |
Posted by: WhiskeySal - 07-18-2021, 11:56 AM - Forum: General questions
- Replies (6)
|
 |
Okay, basic question. I just got started trying out Gimp and what I'm finding is that when I try to edit something on a higher layer it changes the background image instead of just affecting that layer. What am I doing wrong?
|
|
|
batch processing with the fuzzy select tool |
Posted by: DThompson55 - 07-18-2021, 03:15 AM - Forum: Scripting questions
- Replies (3)
|
 |
I'm new to scripting, but I have a programming background, so I think I can do this. I have Python skills.
I have a short movie, which I've exported to 570 individual png files. What I want to do is apply the fuzzy select tool, with a selectivity of 70, smack dab in the center of each png, cut the resulting selection, and save the file somewhere that doesn't overwrite the original.
I thought I might be able to do this using bimp, I've got it running, but it doesn't seem to support the gimp_image_select_contiguous_color function that I would need to do this. Maybe, or maybe I'm looking at it wrong.
When I start googling gimp scripting I find posts going back to the last century. I don't know what the best current methodology is, nor how to get started? I don't want to waste time reading obsolete documentation or approaches to the problem. So I thought i'd ask here.
I'm running on MacOS Big Sur running GIMP 2.10
|
|
|
Liquify - Face |
Posted by: meetdilip - 07-17-2021, 11:56 AM - Forum: General questions
- Replies (2)
|
 |
I saw a very interesting video using PS where there is a built-in effect called Liquify which allows Face deformation in a very interesting way. The video is from Pixavu ( something like that ) and was talking about making caricatures out of photos. This particular plugin can bulge or make the eyes looks big, adjust our mouth, nose etc in a way to help in process.
The video says that this feature is CC 2015 and later. Not sure whether GIMP 2.10 has anything like that. Not complaining, only checking. Thanks.
|
|
|
|