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!

Please note the script registers under the Gradient Menu (from the gradient dialog).

This version has been updated from the original to support alpha in the gradient as well.

-Rob A&gt

AttachmentSize
gradient-from-image.scm3.28 KB

Comments

Image average plugin possible ?

In Photoshop, there seems to exist something VERY interesting, great for correction of color biases: a layer made from the average of the total of all the pixels in the image. You subtract it and have an instant color correction (maybe I see it a little too simplistic).
Wouldn't it be a small step from creating a gradient to sampling ALL the pixels ?? just a little more work for the CPU ...

Done!

This was pretty simple (only one line of scheme) so I fancied it up with a few options based on the colour picker tool and made this plugin:

http://registry.gimp.org/node/16678

-Rob A>