1 This directory includes example code for Imager.
3 If you have sample code to contribute, please contact the maintainer.
5 The notes here just provide a basic description and the functions
10 Produce a color, grey or pure anaglyph image given left and right
11 images of a stereoscopic pair.
13 Uses transform2() and convert().
17 Example using Imager::transform2() to replace one color with another
20 http://www.perlmonks.org/?node_id=497355
22 inline_replace_color.pl
24 Example using Inline::C and the Imager API to replace one color with
29 Produce an interleaved image given the left and right images of a
30 stereoscopic pair. Note that the source images must be pre-scaled.
32 This includes 3 different implementations, first using transform2(),
33 the second using the internal i_copyto() function and the third using
34 the internal i_glin() and i_plin() functions.
39 Example that demonstrates generating an image linked from a HTML form.
41 The POD for this sample discusses alternate approaches and security
47 Example that demonstrates reading an image uploaded via a HTML form.
49 Produces an output image scaled to fit inside 200x200.
54 Example that demonstrates reading an image uploaded via a HTML form.
56 Produces a text/plain report of the tags that Imager defined for the
59 This and the previous sample are very similar, the intent is to show
60 the common elements and to demonstrate that the output is independent
63 See the section "Parsing an image posted via CGI" in Imager::Cookbook
64 for cautions and details on reading uploaded images.
68 Example of adding a border to an image.
72 Example of drawing transformed text.
74 Draws slanted or rotated text to a new image and saves it to a file.
76 As part of this it demonstrates calculating the transformed bounding
81 Simple example of making a Tk::Photo object using Imager data.
85 Simple demonstration of the align_string() method. Usage:
87 perl align-string.pl fontfile size outputfile text...
91 perl align-string.pl fontfiles/ImUgly.ttf 60 test.ppm .A.
93 This demonstrates how the various values of halign and valign
96 inline_capture2image.pl
98 Demonstrates using Inline and Imager's API to convert captured BGR
99 image data into an Imager image.
103 Animate an image fading down to a background color and back again.
105 Demonstrates setting an alpha channel with convert(), rubthrough(),
106 and writing animated GIFs.
110 Scales an animated GIF image, preserving GIF animation information
111 and adjusting the image screen positions to account for the scale
116 Sample from Richard Fairhurst demonstrating the use of the transform2()
117 det() function. Transforms an arbitrary quadrilateral in the input into
118 a square on the output.
122 Produce an animated GIF that blends back and forth between the two
123 supplied images. If the input images form a stereo pair the GIF can
124 be used for wiggle stereoscopy.