You are here

Python

GIMP scripting in Python.

Smart Gradient

This is a simple gradient plugin for GIMP, written in python. It applies a linear gradient to a rectangular selection, in one of four directions, using the colours of the pixels at the starting edge, and fading to the background colour, over the width, or height of the selection. To try this out, all you need to do is download the script, and store it in the gimp plugins folder, in your home directory. Remember to set the executable flag on the file. An example of use may be found on my site : www.andyshelley.co.uk/gimpgradient/index.php

Paper Saver

The script can be used for creating a papersaver when doing scrapbooking. Where many small images of different sizes are to be printed.

This script lets the user pick a number of images. Then tries to packs the images on as few pages as possible, respecting their print size.

The algorithm used is not optimal, but does a fairly good job.

Demonstrate built-in GUI widgets for Gimp plugins written in Python

This plug-in is a demonstration for python programmers of Gimp plug-ins. It displays almost all the built-in GUI widgets for parameters to plugins. It shows what a plug-in dialog can be using what is built into PyGimp. An alternative to using what is built in, is to use a Python GUI library such as pygtk.

Motivation: the documentation seems sparse for PyGimp GUI widgets. This is example code.

It does nothing to Gimp images, it's not for users, just for beginning programmers.

Calendar with image

This is a Python plug-in, written initially in Spanish by Mr Javier Pacheco, which from an image creates a standard complete month calendar. It has been translated in English and modified by me to try for more flexibility in the design of a standard calendar. Seven layers (plus an optional one) are added to the image to control the three main elements mostly below it on the page : background, calendar box and month-year info.
The options in the dialog are:
° Separation between the image and the calendar box
° Width of the calendar box relative to the image

Watermark

Imprints a non-intrusive faint text watermark sparsely repeated over the entire image. The watermark is meant to be visible upon close inspection without disturbing the viewing of the image.

The watermark visibility can be fine-tuned by changing the opacity of the watermark layer.

Contains an image plugin that operates on an open image and a batch
plugin that requires the filenames for the source and modified images.

Requires Python.

Install in the plug-ins GIMP directory. Make sure the file is executable or GIMP will ignore it.

Texture Generator (for 3d artist - I hope!)

The purpose of this script is to create textures for floors or walls without having a repetition, sometimes annoying.
For more information:
http://krypt77.altervista.org/index_gimp.htm

Range Selection Script

The range selection script is a tool for easy and automatic creation of selections and lay­er masks. The selections or masks include all parts of the image that are situated within a defined range of tonal values, colours, saturation or edges. Selections can be based on one of 16 channels. For detailed instructions and several samples have a look at the attached manual.

Make gradient from panoramics photographs

With this script is easy to create gradients that they simulate a sunset or a natural landscape. You take a photo panoramic, it selects a thin vertical strip and it rotates it in counter-clockwise direction. You read the maximum width of the image and insert it (width / 2) like number of segments in the dialog box of the plugin.

Examples of images created with the plugin

panorama image and gradient

On the left original photo, to right the gradient.

Seamless image of one the woven from palettes

To create seamless image of one the woven is very easy with palette-to-textile.py plugin.
Run the plugins, selects a palette, obtains a new image with the model of the woven.

Cross-stitchify v2.1

Someone on an email list I belong to asked about ways of making a counted cross-stitch pattern from a photo. There are commercial packages that do this, but it seemed like something GIMP could do, and I wanted some Python practice.

Attached is a zip file containing the following files:

Pages

Subscribe to RSS - Python