Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 4,307
» Latest member: CDB1983
» Forum threads: 6,638
» Forum posts: 36,170
Full Statistics
|
|
|
Concatenate a layer name with fixed text and variables |
Posted by: tkemmere - 02-11-2023, 05:24 PM - Forum: Scripting questions
- Replies (2)
|
|
Hi all,
I'm learning Python as I go along in the Gimp. Can somebody get me going on this one please?
I have a few variables loaded with figures. (blur is for example 10 and contrast 0.15). I would like to set a layer name, so that later I can save the layer with a filename based on the layer name.
But how do I combine fixed text and variables? It must be something like this, but how exactly?
Code:
pdb.gimp_item_set_name(new_layer, "Blur "+{blur}+"contrast "+{contrast})
I would like the layer name to be "Blur 10 contrast 0.15".
I also tried with "&" but that didn't work either. Nor did it without the "{}".
Am I close? Thanks!
|
|
|
Programmatic XCF text layer editing |
Posted by: Anthony Buff - 02-11-2023, 03:40 PM - Forum: Scripting questions
- Replies (9)
|
|
The above was the answer to a question I found in reddit thanks to a similar quest of mine. I'm set out to do just that, and my lackings on Python programming are very nicely being covered by ChatGPT.
I have text layers in an xcf file with descriptive names and at this point, all I want to do is replace the text in them programmatically from a python script..
Chat GPT has already come up with some python code but it's throwing up a crucial error right at the beginning:
line 1, in <module> import gimpfu ModuleNotFoundError: No module named 'gimpfu'
Then Chat GPT suggested this:
Code:
import sys
sys.path.append("/usr/lib/gimp/2.0/python")
import gimpfu
Same error pretty much:
line 3, in <module> import gimpfu ModuleNotFoundError: No module named 'gimpfu'
Chat GPT suggested to find the location for gimpfu.py
Code:
find / -name gimpfu.py 2>/dev/null
That rendered nothing in my terminal. I'm on bullseye, MX Linux, and GIMP is installed from the repository. I can reinstall should that be the suggestion. I'm on GIMP 2.10.28
Any ideas as to how to go about this? Are there any sample files that could show the editing of an existing text laxer? But then, How can I get python to import the library that talks to the GIMPs API?
|
|
|
[split] GIMP crashes randomly |
Posted by: rickk - 02-11-2023, 07:33 AM - Forum: General questions
- Replies (21)
|
|
(02-06-2023, 06:15 PM)cjsmall Wrote: My question is: are others experiencing this as well?
What I have noticed while working with canvas size 16,000 x 11,000...some operations take an especially long time to conclude, making Gimp appear "locked", although it'd actually chuffing away.
For example, a bucket fill operation, even within a relatively small target area of the larger picture, for instance only 150x 200 pixels, can take 45 seconds to actually paint the target. My guess is that's because Gimp has to calculate it''s task relative to pixel 1;1 of the graphic, so there is a lot of heavy lifting going on under the covers, despite the appearance of a simple task. Paths on really large canvasses take a long time to process, as well.
In fact, I've been getting a surprising amount of outright crashes when stroking a path on large canvases, more so than I've ever experienced with Gimp before, which is heart breaking when I've got considerable work in progress that just goes "poof" along with it.
What I've done is to modify my workfow, performing all the other "non-path" tasks as a group, then saving that as an interim work, before embarking on any extensive path work.... saving paths for last....which the strategy has eliminated a lot of frustration.
I've been knitting "tiles" together of an old map that I found in a multi page format PDF online source. Importing into Gimp at 600 PPI, and then touching up the join areas. And it was going so well I decided to expand my work, ultimately enlarging the canvas to 16,000 x 14,000....whereafter Gimp got REALLY crash prone...crashed like half a dozen times just this afternoon. But having learned the hard way what to expect, I just saved a copy before plotting any path, just to be on the safe side.
Probably need to buy a new laptop, my current machine is maxxed at 8 GB ram..
|
|
|
Cropping multiple images and exporting all layers |
Posted by: PHDIKOULAS - 02-10-2023, 10:28 AM - Forum: General questions
- Replies (3)
|
|
Novice gimp user
I had a previous version of gimp along with some plugin i assume
I could open 10 images as layers, crop and then export all layers. I cannot seem to remember what plugin that was if it even was a plugin. The only thing i remember is that the output folder was always in system 32
Any clue what it might have been?
|
|
|
DPI vs PPI |
Posted by: Wallahoopi - 02-09-2023, 08:40 PM - Forum: General questions
- Replies (2)
|
|
Have a printer requesting 8.5"x11", 300 dpi, 1/8" bleed.
Have a GIMP doc at 2625x3375 and 300 ppi. Printer says it's coming up as wrong size and 72 dpi.
Am I missing something or are ppi and dpi not comparable?
|
|
|
Gradient from border |
Posted by: Relic - 02-09-2023, 03:23 AM - Forum: General questions
- Replies (6)
|
|
Wondering if someone could give me a little help. I used an stl i modeled to create a grayscale heightmap for CNC carving but the outer edges are too steep (see red circle).
I figured I could fix this by applying a gradient around the boundary selection of the image in gIMP to soften the edge between my greyscale image and the black background.
After some google searching I saw there was a tutorial for gradient border select, and the image looks to be similar to the affect I'm trying to achieve, but it was on gimplearn, which seems to no longer exist.
I've included pictures of the greyscale image, what the result is in my carving software, and a picture of the effect i'm trying to achieve.
Any and all help appreciated!
Edit: seems most image hosting service are blocked on my work's network with the exception of tiny pic, which doesn't seem to load into the post correctly, I have included the links below.
https://tinypic.host/i/lJd2K
https://tinypic.host/i/lJ4v8
https://tinypic.host/i/lJNTB
|
|
|
Trying to precisely resize |
Posted by: deathwinger - 02-08-2023, 08:44 PM - Forum: General questions
- Replies (2)
|
|
Hey everyone, I'm new to GIMP and I usually just google my questions and get my answers pretty quickly, however, this issue I haven't found any answers for and its one that affects the functionality of my work process.
I usually resize covers for paperbacks and hardcovers for Amazon and they have precise measurements for what they want as the covers.
Usually on photoshop, I could get the measurement down to the third decimal place without any issues, this is on my PC experience. However, I'm now on a Mac and I'm using GIMP and when I try to do the same for the resize, once I set it and leave the numbers, it rounds up, so 13.025 inches becomes 13.030 inches and 9.917 inches becomes 9.920 inches.
This won't do as Amazon would come back with an error that the size is still unmatched.
How do I ensure that it stays at the exact numbers I selected?
Any assistance would be most appreciated. Enjoying GIMP as an alternative to Photoshop at the moment and want to continue to do so.
|
|
|
Gradient (Color to Transparent) Dithering Effect |
Posted by: Caped64 - 02-08-2023, 05:34 PM - Forum: General questions
- Replies (2)
|
|
For a school project, I need to make a linear gradient go from a color to transparent. I'm no stranger to using Gimp and I know the steps I need to take in order to achieve such an effect but a strange issue has been occurring. There's this weird dithering effect on the side that is supposed to be transparent.
I already unchecked the dithering option in the gradient tools but the effect still persists. I've looked up tutorials but none really seem to have this issue. I've even reinstalled Gimp but nothings changed. Does anyone have any idea of what's going on or what I'm doing wrong?
|
|
|
coordinates appear to change |
Posted by: whburling - 02-08-2023, 04:51 PM - Forum: General questions
- Replies (5)
|
|
PROBLEM STATEMENT
The coordinates of a fixed point in a drawing change after i use the move tool to move the drawing around so i can see other features and then return to the fixed point. The error is on the order of 300 on the x axis and 50 on the y axis and varies for each test. If I measure and move a short distance and return, I am within user error of about +- 2 units.
CONTEXT
The image in GIMP is a scanned image of an architecture drawing.
ASSUMPTION
1) when an image is loaded into GIMP, the coordinate system of GIMP is aligned with the scanned data of the image. Hence The coordinates of any one
point in the image should always be the same.
2) Using the GIMP Move tool, the tool moves only the viewer, not the drawing and its cooordinate system.
3) If i quit the drawing without making any changes in it, the coordinates of a fixed point within the image should have the exact same coordinates when
the image is opened up once again. By exact i mean as exact as the user can replicate where he is measuring. I find +- 5 units acceptable variation.
My errors are at least 300 units.
Please straighten out my misconceptions so that i can change what i am doing so that i can scan and extract coordinates with reliability and repeatability.
thank you
bil
|
|
|
|