1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
gluas
========
Copyright (C) 2004 Øyvind Kolås <pippin@gimp.org>
This package provides the ability to experiment with prototypes and
ideas for image processing. One of it's primary purposes is a teaching
tool students will use to reimplement, and experiment with, simple
image processing operations.
The best documentation for the package is the examples catalog, all
of lua, documented at http://www.lua.org/ is avaiable, as well as the
following image manipulation functions:
set_hsl (x, y, h, s, l)
set_hsv (x, y, h, s, v)
set_lab (x, y, l, a, b)
set_rgb (x, y, r, g, b)
set_rgba (x, y, r, g, b, a)
set_value (x, y, value)
set_alpha (x, y, alpha)
(lua allows multiple return, I use that to illustrate the return value
of the pixel data querying functions)
h,s,l = get_hsl (x, y)
h,s,v = get_hsv (x, y)
l,a,b = get_lab (x, y)
r,g,b = get_rgb (x, y)
r,g,b,a = get_rgba (x, y)
value = get_value (x, y)
alpha = get_alpha (x, y)
flush ()
apply the current processing (which means that pixels retrieved with
get_ functions, will get the data set with set_ functions and not
original data, useful for multipass implementations,
the global variables width and height are set to the pixel dimensions
of the drawable being modified.
progress (amount)
Calling the function progress(val) with a number between 0.0 and 1.0 will
give the user feedback about how much of the image is processed.
Animation
=========
An extra feature of gluas is animation, by pressing shift+ctrl+A you can control some
additional options. The number of frames generated, and the time value to use when doing a
preview.
From within the code the time value can be accessed through the global variable 'time'
which varies from 0.0 at the start of the animation to 1.0 at the end of the animation.
To make the animation "ping-pong" insert code similar to
if time>0.5 then
time=0.5-(time-0.5)
time=time*2
else
time=time*2
end
at the top of your script.
Happy image processing
/pippin
|