Questions tagged [gimp]

For questions about programming the GNU Image Manipulation Program, including plug-ins. Remember to include appropriate tag(s) for the programming language in use. Questions about non-programming use are off-topic for Stack Overflow; consider asking on Super User or Graphic Design instead.

Gimp is an acronym for Image Manipulation Program. It is a freely distributed program for such tasks as photo retouching, image composition and image authoring.

The core of GIMP is implemented in .

Plug-ins may be implemented in a wide choice of languages, including , and and .

Resources

Gimp programming tutorials

Books:

922 questions
7
votes
1 answer

TIFF plot generation and compression: R vs. GIMP vs. IrfanView vs. Photoshop file sizes

I generated some high resolution publication quality plots for example library(plot3D) Volcano<-volcano zf=10 #zoom factor tiff("Volcano.tif", width=1800*zf, height=900*zf, res=175*zf, compression="lzw") image2D(z = Volcano, clab = "height,…
ECII
  • 10,297
  • 18
  • 80
  • 121
7
votes
4 answers

Python: invert image with transparent background (PIL, Gimp,...)

I have a set of white icons on transparent background, and I'd like to invert them all to be black on transparent background. Have tried with PIL (ImageChops) but it does not seem to work with transparent backgrounds. I've also tried Gimp's Python…
Hoff
  • 38,776
  • 17
  • 74
  • 99
7
votes
2 answers

Is there a way to make a script that automatically corrects scanned documents?

I often scan handwritten documents to send to colleagues, and need to make corrections to the digital file once it's scanned. (For example, I change mistakes I made on the original document to white.) I am thinking of some script which can do the…
highsciguy
  • 2,569
  • 3
  • 34
  • 59
6
votes
3 answers

Convert image to indexed color with custom palette through console

I have image.png in truecolor, palette.png (N colors, where N>256) or text file, where list RGB color palette. How to get a picture with this palette? If I use imagemagick: convert image.png -remap palette.png remap_image.png It does not…
Smirnov
  • 153
  • 1
  • 1
  • 9
6
votes
1 answer

openCV vs GIMP, edge detection fails in openCV

I am doing Sobel edge detection in openCV using the with following parameters: cv.Sobel(mat, edgemat, 1, 1) # mat -> source image # edgemat -> taget output image # 1 -> xorder (int) – Order of the derivative x # 1 -> yorder (int) – Order of the…
Xolve
  • 22,298
  • 21
  • 77
  • 125
6
votes
4 answers

How to capture an image of an HTML element, and maintain transparency?

I'm working on a page that will allow a webmaster to add styles to their twitter feed. Several of these styles use transparency in their display. I want to create a list of images for them to choose from. Currently I am taking screenshots on a…
BentFX
  • 2,746
  • 5
  • 25
  • 30
6
votes
2 answers

GIMP 2.10 Python - How to import custom module?

I recently updated to 2.10 GIMP from 2.8, and it seems that none of my plug-ins that imported custom (relative) *.py files work anymore. I dissected the code and it's not the contents of the "path_tools.py" file, it's just the act of trying to…
user7486517
  • 191
  • 1
  • 7
6
votes
1 answer

batch resize images with gimp

I want to resize every jpg in a directory. This is the gimp script I've found. Looks sensible to me. (define (batch-resize pattern) (let* ((filelist (cadr (file-glob pattern 1)))) (while (not (null? filelist)) (let*…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
6
votes
3 answers

GIMP on Windows - executing a python-fu script from the command line

In a Windows environment, I would like to make a call to GIMP for executing a python-fu script (through a BAT file) but the command line call I am using does not produce the expected results. For example, consider the following python-fu script…
Tfb9
  • 219
  • 3
  • 8
6
votes
2 answers

Read SVG file with Python/PIL

I'm new to Python so please be patient with me. Basically my script should run like this: 1) Load an image and split it into R, G, B channels 2) Mark an area of that image with an existing path saved as a svg file and 3) perform some calculations…
seb
  • 119
  • 1
  • 2
  • 4
6
votes
1 answer

Python-fu/gimpfu parameters - What does "image" mean?

I've been trying to switch from script-fu to python-fu, and I can't figure out what I'm supposed to pass for the "image" parameter. In script-fu it was just an integer, but when I put the same integer into python-fu, it just says it's the wrong…
Zaay'd
  • 65
  • 1
  • 5
6
votes
2 answers

GIMP - Alpha to Color

I have created a simple square using GIMP which color is a shade of blue (#07192c). I lowered the opacity on this square a bit, and realized I like the shade of blue which was now created from lowering the opacity. My question is, does GIMP have a…
Sanphorii
  • 135
  • 2
  • 9
6
votes
1 answer

Create a Wacom-like Linux uinput device for work with touchscreen and pen

This is a fairly broad question, so I will try to keep it as focused as I can. I currently own a Lenovo laptop with Ubuntu installed and touchscreen functionality and own a pressure-sensitive Bluetooth pen, and been trying to make the two work…
GeReV
  • 3,195
  • 7
  • 32
  • 44
6
votes
1 answer

Measure "ink" of a plot

I am reading on Tufte's data-ink ratio and I was wondering if it is possible to measure the amount of "ink" a plot uses? If not possible in R perhaps with another tool such as GIMP or imagemagick?
ECII
  • 10,297
  • 18
  • 80
  • 121
6
votes
3 answers

What is the difference between let and let* in Scheme?

I am writting a script for GIMP and using let* as it was in a sample I took. But it seems to be just a lambda sugar exactly like let. Why are they different? What is the difference between them?
akalenuk
  • 3,815
  • 4
  • 34
  • 56