]> git.imager.perl.org - imager.git/blob - samples/README
- add samples/tk-photo.pl
[imager.git] / samples / README
1 This directory includes example code for Imager.
2
3 If you have sample code to contribute, please contact the maintainer.
4
5 The notes here just provide a basic description and the functions
6 used.
7
8 anaglyph.pl
9
10   Produce a color, grey or pure anaglyph image given left and right
11   images of a stereoscopic pair.
12
13   Uses transform2() and convert().
14
15 replace_color.pl
16
17   Example using Imager::transform2() to replace one color with another
18   in an image.
19
20   http://www.perlmonks.org/?node_id=497355
21
22 interleave.pl
23
24   Produce an interleaved image given the left and right images of a
25   stereoscopic pair.  Note that the source images must be pre-scaled.
26
27   This includes 3 different implementations, first using transform2(),
28   the second using the internal i_copyto() function and the third using
29   the internal i_glin() and i_plin() functions.
30
31 samp-form.cgi
32 samp-image.cgi
33
34   Example that demonstrates generating an image linked from a HTML form.
35
36   The POD for this sample discusses alternate approaches and security
37   considerations.
38
39 samp-scale.html
40 samp-scale.cgi
41
42   Example that demonstrates reading an image uploaded via a HTML form.
43
44   Produces an output image scaled to fit inside 200x200.
45
46 samp-tags.html
47 samp-tags.cgi
48
49   Example that demonstrates reading an image uploaded via a HTML form.
50
51   Produces a text/plain report of the tags that Imager defined for the
52   image.
53
54   This and the previous sample are very similar, the intent is to show
55   the common elements and to demonstrate that the output is independent
56   of the input.
57
58   See the section "Parsing an image posted via CGI" in Imager::Cookbook
59   for cautions and details on reading uploaded images.
60
61 border.pl
62
63   Example of adding a border to an image.
64
65 slant_text.pl
66
67   Example of drawing transformed text.
68
69   Draws slanted or rotated text to a new image and saves it to a file.
70
71   As part of this it demonstrates calculating the transformed bounding
72   box of the text.
73
74 tk-photo.pl
75
76   Simple example of making a Tk::Photo object using Imager data.