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
This version has been updated from the original to support alpha in the gradient as well.