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
78
79
80
81
82
83
84
85
|
<refentry id="imagesetpixel">
<indexterm id="IndexImagesetpixel"><primary>imagegetpixel</primary></indexterm>
<refentryinfo><title>Image Processing Opcodes</title></refentryinfo>
<refmeta>
<refentrytitle>imagesetpixel</refentrytitle>
</refmeta>
<refnamediv>
<refname>imagesetpixel</refname>
<refpurpose>
Set the RGB value of a pixel inside a previously opened or created image.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>Set the RGB value of a pixel inside a previously opened or created image. An image can be loaded with <link linkend="imageload"><citetitle>imageload</citetitle></link>. An empty image can be created with <link linkend="imagecreate"><citetitle>imagecreate</citetitle></link> and saved with <link linkend="imagesave"><citetitle>imagesave</citetitle></link>.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis><command>imagegetpixel</command> iimagenum, ax, ay, ared, agreen, ablue</synopsis>
<synopsis><command>imagegetpixel</command> iimagenum, kx, ky, kred, kgreen, kblue</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>iimagenum</emphasis> -- the reference of the image.. It should be a value returned by <link linkend="imageload"><citetitle>imageload</citetitle></link> or <link linkend="imagecreate"><citetitle>imagecreate</citetitle></link>.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>ax (kx)</emphasis> -- horizontal pixel position (must be a float from 0 to 1).
</para>
<para>
<emphasis>ay (ky)</emphasis> -- vertical pixel position (must be a float from 0 to 1).
</para>
<para>
<emphasis>ared (kred)</emphasis> -- red value of the pixel (mapped to a float from 0 to 1).
</para>
<para>
<emphasis>agreen (kgreen)</emphasis> -- green value of the pixel (mapped to a float from 0 to 1).
</para>
<para>
<emphasis>ablue (kblue)</emphasis> -- blue value of the pixel (mapped to a float from 0 to 1).
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the imagesetpixel opcode. It uses the file <ulink url="examples/imageopcodes.csd"><citetitle>imageopcodes.csd</citetitle></ulink>.
<example>
<title>Example of the imagesetpixel opcode.</title>
<xi:include href="examples-xml/imageopcodes.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="imageload"><citetitle>imageload</citetitle></link>,
<link linkend="imagecreate"><citetitle>imagecreate</citetitle></link>,
<link linkend="imagesize"><citetitle>imagesize</citetitle></link>,
<link linkend="imagesave"><citetitle>imagesave</citetitle></link>,
<link linkend="imagegetpixel"><citetitle>imagegetpixel</citetitle></link>,
<link linkend="imagefree"><citetitle>imagefree</citetitle></link>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: Cesare Marilungo</member>
</simplelist>
</para>
<para>New in version 5.08</para>
</refsect1>
</refentry>
|