Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python is a general-purpose programming language available for many operating systems.

0
votes
2answers
40 views

Gimp Python-Fu how to copy a channel

Suppose I want to copy the red channel of an image (thus creating a new channel). How do I do that with Python-Fu? EDIT: basically, I need to create luminosity masks. So far, I tryed the following ...
1
vote
1answer
109 views

GIMP - Pythonfu PDB Code For Colors>Desaturate>Color To Gray

I'm using GIMP 2.10.2 and there is an option here for Colors>Desaturate>Color To Gray which works nicely by removing unnecessary gray shades from the photo. However, I have about 200 photos which ...
0
votes
2answers
873 views

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

I want to add a variable text (file name) to a photo and fill the background with a color (white) so that the text is clearly visible. How can I conveniently fill the already created text layer e.g. ...
0
votes
1answer
318 views

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

I suppose the very first question to ask if if Inkscape or Illustrator have internal functions for this automation. If not, would something like Python make sense? I'd like to write a small web app ...
22
votes
3answers
2k views

Generate colorful streamline pattern (using FOSS)

I found a very interesting pattern, which I would like to recreate: Source I tried to start with the RGB-Noise filter of Gimp, but didn't get a comparable pattern so far. I understood, that there ...
0
votes
1answer
237 views

Gimp: How to create a selection from file in Python

I am using Gimp's non-interactive mode, since I want to process a big number of images and their masks. For every image file, I have a mask image file, which consists of 1 and 0s (1 means the pixel ...
3
votes
1answer
226 views

Python library to expand type and offset paths like Illustrator

I use Adobe Illustrator extensively and automate it with AppleScript. I recently made a children's toy where I need to expand letter font objects (so I can cut them with the laser cutter) and offset ...
2
votes
2answers
181 views

Why does an almost solid line appear in this image?

I am learning how to use python's pillow library to produce images, and for a test I made it produce a 256*256 RGB image with each pixels green value equal to its x position and its blue value equal ...
0
votes
2answers
183 views

How to draw the perpendiculars from the incentre in Inkscape?

I have a triangle ABC. I know how to draw and find the incentre O (Extensions → Render → Draw from triangle → Incentre). I need to draw the three perpendiculars KO, LO, MO from the incentre O to ...
-1
votes
1answer
798 views

Convert SVG to image with multiple fonts

I have an SVG with a custom font defined in the defs section. When I load it up in Safari everything's fine. Unfortunately, when I try to convert it, with Python and ImageMagick for example, to a png ...
3
votes
1answer
570 views

GIMP: A code to edit a whole folder of images

[GIMP 2.8.16] EDITED: See below. Hi, I am new to python, and I need to ask the community to please help me find where is this code failing. I am having trouble. This is version 1.0, following this ...
0
votes
0answers
183 views

What programming language/library can I use to do 2D text animations like After Effects?

I want to code custom text animations similar to what you would see in this video but instead of using a motion graphics program like After Effects, I want to code it by hand. In that way I can create ...
0
votes
2answers
1k views

Can't find new plug-in in GIMP [closed]

I'm trying to install this plugin on GIMP 2.8 on Windows 10. I've followed the instructions and copied the scripts on my plugins folder but I can't find the plugins or the Sprite Sheet menu. I've ...
0
votes
1answer
623 views

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

I've been 3 days searching for documentation about python-fu for GIMP 2.8, and the one I find is great, but deprecated. So I'm now stuck at this place: I've created 3 color channels, and want to add ...
-1
votes
1answer
974 views

python single line for loops [closed]

i'm using processing.py i was following this tut (Java) https://www.youtube.com/watch?v=H7frvcAHXps and i'm wondering if i can use the same kind of for loop in python for(int y = 0; y < height; ...
0
votes
1answer
810 views

Who designed the Python “two snakes” logo?

Here it is, known as the "double snakes" logo and first used in 2005. http://www.python.org/community/logos/
0
votes
1answer
170 views

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

I have a color 0xADADAD, it was originally white, now it's grey, because it's been alpha blended with 30%(0.3 alpha) black + the unknown original value. In this case I know from lots of trial and ...
1
vote
2answers
391 views

autoshrink with aspect ratio

Is there any simple way to autocrop/autoshrink a square image in GIMP, but without changing aspect ratio? Basically the autoshrinking would stop once it's no longer possible to maintain height and ...
5
votes
4answers
3k views

Export multi page pdf with gimp

I understand that it may be possible using imageMagicks: convert image.mng out.pdf however is there a gimp way of doing this? I also saw this script/plugin which uses convert: https://www.dropbox....
1
vote
1answer
153 views

Data merge for PDF

Lets say I have 100 PDFs in one folder1 (filename: 1, 2,3,4..) and another 100 PDF in another folder2 (Filename: 1,2,3,4...). Now I want to combine PDF1 in folder1 with PDF1 in folder2 and so on till ...
17
votes
5answers
5k views

Programmatically creating radiating rows of dots

I want to create a speaker hole pattern like this: But I'm not sure where to start. Can this be achieved without laborious positioning in Illustrator or similar software?