You are here

sample

Python-Fu samples

This package contains 12 scripts, developed using Python and GIMP 2.8, which objective is to serve as templates and as code samples to programmers that are new in Python-Fu scripting.
In order to install these scripts, you must copy them in the "plug-ins" folder of GIMP (normally "GIMP 2/lib/gimp/2.0/plug-ins").
After installed, the scripts can be found in "Filters -> Test".

Basic scripts

These scripts are basic examples of how to create a Python plugin.

Python-Fu samples

== Pythoh-Fu samples ==

This package contains 12 scripts, developed using Python and GIMP 2.8, which objective is to serve as templates and as code samples to programmers that are new in Python-Fu scripting.
In order to install these scripts, you must copy them in the "plug-ins" folder of GIMP (normally "GIMP 2/lib/gimp/2.0/plug-ins").
After installed, the scripts can be found in "Filters -> Test".

Basic scripts

These scripts are basic examples of how to create a Python plugin.

Sample Average Colour

This simple plugin was created in response to a request here.

It simply samples the entire image colour, and allows you to either:
- Display the RGB or grey values
- Set the foregound colour
- Set the background colour
- Add it to the current palette (if editable)

There is a toggle to sample just the layer, or the merged image.

It registers in the Colour menu as "Sample Average Colour..." and should work for RGB, indexed, or greyscale images.

Sample Gradient from Image

This script compliments my "Sample Gradient Along a Path" script and was originally developed to generate the gradients bundled here.  This script simply scales the image to be 1 px high and samples across it, so it only works correctly with horizontal gratent images. 

You can however create some interesting gradients with other images.  For example, an image that is 1/2 black and 1/2 white diagonally will creat a gratent that blends linearly from black to white!

Subscribe to RSS - sample