Skip to main content
24 votes
Accepted

Generate colorful streamline pattern (using FOSS)

This is for GIMP Start with something like an A5 canvas size Create a new brush like this Create a new Paint Dynamic preset, and set the matrix as follows Increase the size of the brush as you like,...
Billy Kerr's user avatar
  • 89.5k
14 votes

Generate colorful streamline pattern (using FOSS)

Here' my approach for Gimp: Used an interesting photo with colours I liked Source: Wikimedia - New York Times Square Chose a region of interest from this photo Increased saturation, contrast, and (...
Takkat's user avatar
  • 12.6k
10 votes
Accepted

How can I draw seamless texture and have GIMP mirror the edges on texture sides?

In Gimp 2.10, you don't need to do this, you just use the Symmetry painting feature. Create an image which is 3x3 the size of your intended tile (in theory, 2x2 is enough but the effect is easier to ...
xenoid's user avatar
  • 17.8k
7 votes

Is it possible to revert preapplied alpha blend and find original color?

Yeah its possible i made a quick change to the code in this post and came up with following very sloppy python 2.X code: from Tkinter import * import struct def ablend(a, fg, bg): return ((1-a)*...
joojaa's user avatar
  • 58.6k
4 votes
Accepted

How to draw the perpendiculars from the incentre in Inkscape?

Here's one method. There may be others of course. Mark the origin of your incentre with guides. Draw squares from the intersection of each triangle side and guide, to the centre origin (hint: Hold ...
Billy Kerr's user avatar
  • 89.5k
4 votes
Accepted

Gimp 2.10.12 not loading Python plugins

Make sure you have installed the gimp-python package, which has become "optional" in recent Ubuntu releases. The message you see above is normal, the python code imports modules that are only ...
xenoid's user avatar
  • 17.8k
4 votes

How can I draw seamless texture and have GIMP mirror the edges on texture sides?

I have discovered a way to do this exactly as I wanted. Steps: Decide the size of your final texture, for example 1024x1024 Decide on a margin you want to have around it to be able to see the ...
Tomáš Zato's user avatar
  • 1,004
3 votes

How can I draw seamless texture and have GIMP mirror the edges on texture sides?

There are a couple of ways you could make seamless patterns/tiles in GIMP. The first is using Filters > Map > Tile Seamless. This may work better for some textures than others. Probably better ...
Billy Kerr's user avatar
  • 89.5k
3 votes
Accepted

Python library to expand type and offset paths like Illustrator

I think this is difficult in Python and I used Inkscape, which can expand font objects (called "object to path"), add stroke to paths, and allows running commands from the command-line. For example, ...
emonigma's user avatar
  • 709
3 votes

How to get the coordinates for a selection bounding box in Gimp

A very basic python script that does it: #!/usr/bin/env python from gimpfu import * def selectionMargins(image): selection,x1,y1,x2,y2=pdb.gimp_selection_bounds(image) if not selection: ...
xenoid's user avatar
  • 17.8k
3 votes

How to get the coordinates for a selection bounding box in Gimp

This example image is 200px x 200px. If you don't know it, you can find the size by clicking Image > Canvas Size The Crop Tool options show the X and Y position of the top left corner of the crop, ...
Billy Kerr's user avatar
  • 89.5k
3 votes
Accepted

Can't find new plug-in in GIMP

Missing plugin: Navigate to your Gimp profile directory open the pluginrc file with a text editor editor. search for the plugin file in a line that starts with (plug-in-def If the file is listed, ...
xenoid's user avatar
  • 17.8k
2 votes

How to mask a layer from a channel in GIMP with Python?

The API doesn't seem to support creating a mask directly from a random channel. But you can create a mask from the selection, so: Copy your channel into the selection pdb.gimp_image_select_item(...
xenoid's user avatar
  • 17.8k
2 votes
Accepted

python single line for loops

def drange(start, stop, step): """floating range code by gimel see: http://stackoverflow.com/questions/477486/ """ r = start while r < stop: yield r r += ...
joojaa's user avatar
  • 58.6k
2 votes

GIMP: A code to edit a whole folder of images

glob is module that contains a glob function, so that shouldn't be glob(source_folder + "/*.JPG") but glob.glob(source_folder + "/*.JPG") Also, if you give a path as part of the pattern to glob....
xenoid's user avatar
  • 17.8k
2 votes

Python library to expand type and offset paths like Illustrator

I found this beautiful node library: outline-stroke/outline-stroke-cli It was possible to convert it into a standalone packages, as described here. Download of the linux binary is also there. How to ...
MrTomRod's user avatar
  • 123
1 vote
Accepted

svg : what does "use xlink:href" mean in Inkscape?

Use-elements are a way of placing multiple copies of an object without having to duplicate the definition or a whole node-tree. Elements can be referenced by id with the xlink:href attribute. Inside ...
Xrott's user avatar
  • 3,826
1 vote

Customizing CMYK Halftone Screens in PDF Files

There is a reason why halftoning is usually controlled more downstream by the RIP software: the halftoning is optimized for the exact resolution of the imaging device and the printing process. It also ...
Kris Van Bael's user avatar
1 vote
Accepted

How to access image histogram values in python-fu?

You can use the gimp_drawable_histogram while iterating a window, for instance: hist=[pdb.gimp_drawable_histogram(drawable,HISTOGRAM_VALUE,x/255.,(x+1)/255.) for x in range(255)] On an 8Mpix image it ...
xenoid's user avatar
  • 17.8k
1 vote
Accepted

Gimp Python-Fu how to copy a channel

Your third argument should be None: pdb.gimp_image_insert_channel(i, c, None,0) The doc is mostly written with the script-fu point if view, where items are just integer ids, and "no item" is ...
xenoid's user avatar
  • 17.8k
1 vote
Accepted

Adding text layer with white background to image by using gimp python-fu

Several ways: Plain bucket fill The simpler is to bucket-fill the text layer in behind mode: pdb.gimp_selection_all(image) pdb.gimp_edit_bucket_fill(textlayer, BUCKET_FILL_FG, LAYER_MODE_BEHIND, ...
xenoid's user avatar
  • 17.8k
1 vote

Adding text layer with white background to image by using gimp python-fu

I can tell you a simple way to do it in GIMP, without scripting it. So, that may help you to script it. Create a text layer Discard the Text Information (this rasterizes the text) Remove the alpha ...
Billy Kerr's user avatar
  • 89.5k
1 vote

Is there a way to auto-generate (parametric) vector graphics to use in Inkscape/Illustrator?

Yes offcourse. Encapsulated postScript (EPS), Scalable Vector Graphics (SVG), Portable Document Format (PDF) and Drawing Exchange Format (DXF) are all just relatively simple text files. They are all ...
joojaa's user avatar
  • 58.6k
1 vote
Accepted

Gimp: How to create a selection from file in Python

The simplest way is to load your mask as a new layer, do a color selection from it, and then remove it. So assuming that image is your current image: import gimpcolor # load mask as layer mask=pdb....
xenoid's user avatar
  • 17.8k
1 vote

Python library to expand type and offset paths like Illustrator

For offsetting paths (and some other graphics/geometry opperations), you could use the Shapely library: https://shapely.readthedocs.io/en/stable/manual.html#constructive-methods Its' main focus is GIS ...
Ideogram's user avatar
  • 601
1 vote

Why does an almost solid line appear in this image?

Banding effects like this can occur when the image viewer tries to compensate for differences in gamut between two color spaces or color profiles.
filip's user avatar
  • 2,119
1 vote

Export multi page pdf with gimp

I fixed this very easily by adding the absolute path to the convert executable inside the script. On my machine it is: /opt/local/bin/convert This function becomes: def combine_images_into_pdf(...
Andrew Flinders's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible