Skip to main content

Questions tagged [python]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Improving the appearance of statistics frames in data reduction software (Python, custom/themed tkinter)

I am building mass spec data reduction software in Python for a niche scientific instrument, and could use some advice on how to make my statistics look less amateurish. The target audience is mostly ...
ohshitgorillas's user avatar
1 vote
2 answers
126 views

How do I normalize all pixel values such that all pixel values are 'pulled towards' the mean?

Edit: I posted this question on the Computer Graphics site here per suggestion I have a bunch of scanned document images and in each image there is a variance in background colour (sometimes a wide ...
skeetastax's user avatar
0 votes
0 answers
222 views

Creating nurbs curves using python

I'm trying to automate the creation of nurbs curves using python for an auto rigger I am making. Unfortunately I cant seem to wrap my head around the cmds.curve command making the curve periodic. This ...
Dan O'Reilly's user avatar
0 votes
1 answer
381 views

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

Is the blue circle a "node" - or what - in this screenshot, and what can be done with it? Are the only edits (via GUI) going to be by clicking the individual circle? Will "stroke" ...
Bryan-StackExchange's user avatar
1 vote
2 answers
189 views

Customizing CMYK Halftone Screens in PDF Files

I am looking for a way to adjust the halftone screens of each color channel in CMYK PDF files using Python. I would like to enhance the perceived print resolution of the files using techniques such as ...
adhoc's user avatar
  • 11
0 votes
1 answer
136 views

Is there a program or tool that can determine the alpha value of a color given it's background and foreground color

I have a color that has a HEX value of 180031 or rgb(24, 0, 49). However, the color is supposed to be a shade of purple with a black background, but I don't know what the alpha value is. Is there a ...
Throwaway1942's user avatar
7 votes
3 answers
2k views

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

There’s a tool that I’d really like to have, and AFAIK it does not exist at all. When drawing textures freehand one typically wants them to be seamless. How I’d go about that is having larger image ...
Tomáš Zato's user avatar
  • 1,004
1 vote
1 answer
177 views

How to access image histogram values in python-fu?

I have been writing code in the python-fu console of gimp and I wanted to find the minimum of an image histogram (the pixel intensity value with the least frequency). There are two functions in the ...
doubtful_noob's user avatar
2 votes
2 answers
249 views

How to use RGB mask to create several images based on color replacement

I have several RGB images in a game that are used as "references" to create other images. Below there are three examples of references: "R-male.png", "Fish.png", "...
Luiz Fernando Puttow Southier's user avatar
0 votes
1 answer
143 views

GIMP python-fu export all open images to pdf error

I can get the current images open using gimp.image_list() but how can I export them to a single pdf? The function pdb.file_pdf_multi_save() does not work. I do not intend to use ImageMagick, not sure ...
Masum's user avatar
  • 99
0 votes
0 answers
107 views

Bulk adding template aka Watermark/image in Premiere pro (asking if it can be done

My main desires for Video production are: Take a folder of videos and apply a graphic template under each video in question basically a layer underneath the actual video ( this will prevent a lot of ...
NonCoder's user avatar
2 votes
1 answer
159 views

Repeated scale/zoom by small % creates cross/seam at center. How to mitigate?

I'm trying to process an image iteratively. I have an order of operations, specifically a series of effects. This process loops until I'm satisfied with the result. To showcase how the process ends up ...
Web and Flow's user avatar
0 votes
0 answers
238 views

Scripted solution to penetrating meshes (Maya)

I have thousands of human meshes that are wearing garment meshes (some with looser garments and others with tighter garments). The problem is that the garments are penetrating the human mesh in ...
PiccolMan's user avatar
1 vote
1 answer
3k views

Gimp 2.10.12 not loading Python plugins

I recently installed Kubuntu 19.04 and installed the latest Gimp (v2.10.12) with apt. I moved my plugins into the folder ~/.config/GIMP/2.10/plug-ins and made sure the python files are set to be ...
Davide_sd's user avatar
  • 145
1 vote
1 answer
1k views

Visible Snapping Guidelines in Krita

I want to make the snapping guidelines visible like those in Photoshop for the Krita Digital Art Software. Does Krita have a settings option that I could make use of, if not how can I write an ...
iamnexxed's user avatar
0 votes
0 answers
70 views

process SVG to continuous, "no move"

I am working with continuous script fonts and I need to generate a single path that do not include M commands. This would be equivalent to writing without lifting the pen from the paper. My input is ...
Oren Pinsky's user avatar
3 votes
2 answers
5k views

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

I'll make a rectangle selection in image. I have to read the left, right, up and down dimensions of this selected region in full image. The following image is an example of this. Edit: Can we print ...
Özgür's user avatar
  • 131
2 votes
2 answers
867 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 ...
Davide_sd's user avatar
  • 145
1 vote
1 answer
734 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 ...
Dave's user avatar
  • 13
2 votes
2 answers
4k 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. ...
help-info.de's user avatar
3 votes
1 answer
3k 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 ...
WirelessGuy NY's user avatar
22 votes
3 answers
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 ...
n4pK's user avatar
  • 323
0 votes
1 answer
1k 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 ...
Hristo Vrigazov's user avatar
3 votes
3 answers
1k 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 ...
emonigma's user avatar
  • 699
2 votes
2 answers
229 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 ...
CatOnAKeyboard's user avatar
1 vote
2 answers
1k 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 ...
Nick's user avatar
  • 163
-1 votes
1 answer
2k 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 ...
Nima Mousavi's user avatar
3 votes
1 answer
2k 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 ...
Á. F. López de Quadros's user avatar
0 votes
2 answers
7k 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 ...
forameuss's user avatar
1 vote
1 answer
1k 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 ...
gines capote's user avatar
-1 votes
1 answer
2k 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; ...
Kipp Fhtagn's user avatar
0 votes
1 answer
1k 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/
Matt Sephton's user avatar
3 votes
1 answer
1k 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 ...
AlienX's user avatar
  • 41
1 vote
2 answers
688 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 ...
Matthew Morrone's user avatar
5 votes
4 answers
4k 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.com/...
jmunsch's user avatar
  • 161
1 vote
1 answer
271 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 ...
mohad's user avatar
  • 13
17 votes
5 answers
8k 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?
Tom's user avatar
  • 455