a1c5881995-08-09Fredrik Hübinette (Hubbe) <?xml version='1.0' encoding='utf-8'?>
4378f62021-03-17Tobias S. Josefowitz <manual time-stamp='2021-03-17' version='Pike v7.1.11'>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <dir name='./traditional_manual'> <file name='./traditional_manual/top.html'> <chapter title='Table of Contents' unnumbered='1'> <dl><dt><url href='top.html'>Table of Contents</url></dt> <dt><url href='chapter_1.html'>1. LFUN</url></dt> <dt><url href='chapter_2.html'>2. I/O</url></dt> <dt><url href='chapter_3.html'>3. Specific Datatype Modules</url></dt> <dt><url href='chapter_4.html'>4. Image Module</url></dt> <dt><url href='chapter_5.html'>5. Protocols</url></dt> <dt><url href='chapter_6.html'>6. Database Access</url></dt> <dt><url href='chapter_7.html'>7. Graphic User Interface</url></dt> <dt><url href='chapter_8.html'>8. The rest</url></dt> <dt><url href='appendix_A.html'>A. Image.Color colors</url></dt> <dt><url href='appendix_B.html'>B. Image.Layer modes</url></dt> </dl> </chapter> </file> <file name='./traditional_manual/chapter_1.html'> <chapter number='1' title='LFUN'>
4378f62021-03-17Tobias S. Josefowitz  <insert-move entity='lfun::'/> <insert-move entity='::'/>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </chapter> </file> <file name='./traditional_manual/chapter_2.html'> <chapter number='2' title='I/O'>
33402e1997-02-11Fredrik Hübinette (Hubbe)  <autodoc hidden='1'><namespace hidden='1' name='predef'><module hidden='1' name='Stdio'><class name='File'> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>Stdio.File</tt> - the basic file handling program</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Stdio.File is a pre-compiled Pike program, written in C. It contains the functions needed to handle files, sockets, streams and pipes from within Pike. Stdio.File is a part of the files module.
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Here follows the descriptions of the functions in Stdio.File:
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text>
33402e1997-02-11Fredrik Hübinette (Hubbe) </doc> <docgroup homogen-name='assign' homogen-type='method'> <method name='assign'> </method> <doc placeholder='true'> <text> <p><tt>assign</tt> - assign a file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;assign(object <i>f</i>);<br/> </p> </tt> <p>This function takes a clone of Stdio.File and assigns all variables this file from it. It can be used together with file-&gt;dup to move files around.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;dup'>&gt;file-&gt;dup</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='close' homogen-type='method'> <method name='close'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>close</tt> - close file</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;close(string <i>how</i>);<br/> or<br/> int file-&gt;close();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Close the file. Optionally, specify "r", "w" or "rw" to close just the read, just the write or both read and write part of the file respectively. Note that this funciton will not call the close_callback.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='file-&gt;close'>&gt;file-&gt;close</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group>
33402e1997-02-11Fredrik Hübinette (Hubbe) </doc> </docgroup> <docgroup homogen-name='connect' homogen-type='method'> <method name='connect'> </method> <doc placeholder='true'> <text> <p><tt>connect</tt> - connect a socket to something.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;connect(string <i>ip</i>,int <i>port</i>);<br/>
9118d41997-02-06Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This funcion connects a socket previously created with file-&gt;open_socket to a remote socket. The argument is the ip name or number fot he remote machine. </p> <p>This function returns 1 for success, 0 otherwise. Note that if the socket is in nonblocking mode, you have to wait for a write or close callback before you know if the connection failed or not.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;query_address'>&gt;file-&gt;query_address</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>create</tt> - init file struct</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>object clone((program)"Stdio.F<i>ile</i>");<br/> or<br/> object clone((program)"Stdio.F<i>ile</i>",string <i>fd</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>When cloning a file, you can specify that you want to clone stdin, stdout or stderr, by giving "stdin", "stdout" or "stderr" to clone as a second argument. If no second argument is given, an unitialized file will be cloned.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text>
02866a1997-02-13Niels Möller <p><ref to='Builtin.clone'>Builtin.clone</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group>
33402e1997-02-11Fredrik Hübinette (Hubbe) </doc> </docgroup> <docgroup homogen-name='dup' homogen-type='method'> <method name='dup'> </method> <doc placeholder='true'> <text> <p><tt>dup</tt> - duplicate a file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>object file-&gt;dup();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns a clone of Stdio.File with all variables copied from this file. Note that all variables, even id, is copied.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;assign'>&gt;file-&gt;assign</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='dup2' homogen-type='method'> <method name='dup2'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>dup2</tt> - duplicate a file over another</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;dup2(object <i>o</i>);<br/> </p> </tt> <p>This function works similar to file-&gt;assign, but instead of making the argument a reference to the same file, it creates a new file with the same properties and places it in the argument.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><example/><text> <tt><p>/* Redirect stdin to come from the file 'foo' */<br/> object o;<br/> o=clone((program)"Stdio.File");<br/> o-&gt;open("foo","r");<br/> o-&gt;dup2(clone((program)"Stdio.File","stdin"));<br/> </p> </tt></text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;assign'>&gt;file-&gt;assign</ref> and <ref to='file-&gt;dup'>&gt;file-&gt;dup</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='errno' homogen-type='method'> <method name='errno'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>errno</tt> - what was last error?</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;errno();<br/> </p> </tt> <p>Return the error code for the last command on this file. Error code is normally cleared when a command is successful. </p> <p/> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='open' homogen-type='method'> <method name='open'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>open</tt> - open a file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;open(string <i>filename</i>, string <i>how</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Open a file for read, write or append. The variable how should contain one or more of the following letters: </p> <p><matrix> <r><c> 'r' </c><c> open file for reading </c></r> <r><c> 'w' </c><c> open file for writing </c></r> <r><c> 'a' </c><c> open file for append (use with 'w') </c></r> <r><c> 't' </c><c> truncate file at close (use with 'w') </c></r> <r><c> 'c' </c><c> create file if it doesn't exist (use with 'w') </c></r> <r><c> 'x' </c><c> fail if file already exist (use with 'c') </c></r> </matrix>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) </p> <p>How should _always_ contain at least one of 'r' or 'w'. </p> <p>Returns 1 on success, 0 otherwise.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;close'>&gt;file-&gt;close</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='open_socket' homogen-type='method'> <method name='open_socket'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>open_socket</tt> - open a socket</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;open_socket();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This makes this file into a socket ready for connection. The reason for this function is so that you can set the socket to nonblocking or blocking (default is blocking) before you call file-&gt;connect() This function returns 1 for success, 0 otherwise.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;connect'>&gt;file-&gt;connect</ref> and <ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group>
7491fd1995-10-11Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='pipe' homogen-type='method'> <method name='pipe'> </method> <doc placeholder='true'>
7491fd1995-10-11Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>pipe</tt> - create a two-way pipe</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>object file-&gt;pipe();<br/>
7491fd1995-10-11Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function creates a pipe between the object it was called in and an object that is returned. The two ends of the pipe are indistinguishable. If the object is this function is called in was open to begin with, it is closed before the pipe is created.</p> </text>
7491fd1995-10-11Fredrik Hübinette (Hubbe)  <group><seealso/><text>
02866a1997-02-13Niels Möller <p><ref to='Builtin.fork'>Builtin.fork</ref></p>
7491fd1995-10-11Fredrik Hübinette (Hubbe) </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_address' homogen-type='method'> <method name='query_address'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_address</tt> - get adresses</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>string file-&gt;query_address();<br/> or<br/> string file-&gt;query_address(1);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns the remote or local address of a socket on the form "x.x.x.x port". Without argument, the remote address is returned, with argument the local address is returned. If this file is not a socket, not connected or some other error occurs, zero is returned.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;connect'>&gt;file-&gt;connect</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_close_callback' homogen-type='method'> <method name='query_close_callback'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_close_callback</tt> - return the close callback function</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>function file-&gt;query_close_callback();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns the close_callback, which is set with file-&gt;set_nonblocking.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p> </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_id' homogen-type='method'> <method name='query_id'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_id</tt> - get id of this file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>mixed file-&gt;query_id();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
33402e1997-02-11Fredrik Hübinette (Hubbe) </tt> <p>This function returns the id of this file.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_id'>&gt;file-&gt;set_id</ref></p> </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_read_callback' homogen-type='method'> <method name='query_read_callback'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_read_callback</tt> - return the read callback function</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>function file-&gt;query_read_callback();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns the read_callback, which is set with file-&gt;set_nonblocking.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_write_callback' homogen-type='method'> <method name='query_write_callback'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_write_callback</tt> - return the write callback function</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>function file-&gt;query_write_callback();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns the write_callback, which is set with file-&gt;set_nonblocking.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='read' homogen-type='method'> <method name='read'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>read</tt> - read data from a file or stream</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>string file-&gt;read(int <i>nbytes</i>);<br/> or<br/> string file-&gt;read(int <i>nbytes</i>, int <i>notall</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
9118d41997-02-06Fredrik Hübinette (Hubbe) </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Read tries to read nbytes bytes from the file, and return it as a string. If something goes wrong, zero is returned. </p> <p>If a one is given as second argument to read(), read will not try it's best to read as many bytes as you asked it to read, it will merely try to read as many bytes as the system read function will return. This mainly useful with stream devices which can return exactly one row or packet at a time.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;write'>&gt;file-&gt;write</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='seek' homogen-type='method'> <method name='seek'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>seek</tt> - seek to a position in a file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;seek(int <i>pos</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Seek to a position in a file, if pos is less than zero, seek to position pos relative end of file. Return -1 for failiure, or the old position in the file when successful.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;tell'>&gt;file-&gt;tell</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_blocking' homogen-type='method'> <method name='set_blocking'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_blocking</tt> - make stream blocking</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_blocking();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets a stream to blocking mode. ie. all reads and writes will wait until data has been written before returning.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_buffer' homogen-type='method'> <method name='set_buffer'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_buffer</tt> - set internal socket buffer</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_buffer(int <i>bufsize</i>, string <i>mode</i>);<br/> or<br/> void file-&gt;set_buffer(int <i>bufsize</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the internal buffer size of a socket or stream, the second argument allows you to set the read or write buffer by specifying "r" or "w". It is not guaranteed that this function actually does anything, but it certainly helps to increase data transfer speed when it does.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;open_socket'>&gt;file-&gt;open_socket</ref> and <ref to='port-&gt;accept'>&gt;port-&gt;accept</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_close_callback' homogen-type='method'> <method name='set_close_callback'> </method> <doc placeholder='true'>
2f590d1996-12-03Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_close_callback</tt> - set the close callback</p>
2f590d1996-12-03Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_close_callback(function close_callback)<br/>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the close callback for the file. The close callback is called when the remote end of a socket or pipe is closed. Note that this function does not set the file nonblocking.</p> </text>
2f590d1996-12-03Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </text></group>
64a6361995-10-20Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_close_on_exec' homogen-type='method'> <method name='set_close_on_exec'> </method> <doc placeholder='true'>
64a6361995-10-20Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_close_on_exec</tt> - set / clear the close on exec flag</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_close_on_exec(int <i>onoff</i>);<br/>
64a6361995-10-20Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function determines weather this file will be closed when calling exece. Default is that the file WILL be closed on exec except for stdin, stdout and stderr.</p> </text>
64a6361995-10-20Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text>
02866a1997-02-13Niels Möller <p><ref to='Builtin.exece'>Builtin.exece</ref></p>
33402e1997-02-11Fredrik Hübinette (Hubbe) </text></group>
64a6361995-10-20Fredrik Hübinette (Hubbe) 
a1c5881995-08-09Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_id' homogen-type='method'> <method name='set_id'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_id</tt> - set id of this file</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_id(mixed <i>id</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the id of this file. The id is mainly used as an identifier that is sent as the first arguments to all callbacks. The default id is 0. Another possible use of the id is to hold all data related to this file in a mapping or array.</p> </text>
2f590d1996-12-03Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='file-&gt;query_id'>&gt;file-&gt;query_id</ref></p> </text></group>
2f590d1996-12-03Fredrik Hübinette (Hubbe)  </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_nonblocking' homogen-type='method'> <method name='set_nonblocking'> </method> <doc placeholder='true'>
2f590d1996-12-03Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_nonblocking</tt> - make stream nonblocking</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_nonblocking(function read_callback,<br/> <dl><group><text>function write_callback,<br/> function close_callback);<br/> </text></group></dl>or<br/> void file-&gt;set_nonblocking();<br/> <br/>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets a stream to nonblocking mode. When data arrives on the stream, read_callback will be called with some or all of this data. When the stream has buffer space over for writing, write_callback is called so you can write more data to it. If the stream is closed at the other end, close_callback is called. All callbacks will have the id of file as first argument when called. </p> <p>If no arguments are given, the callbacks are not changed. The stream is just set to nonblocking mode.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_blocking'>&gt;file-&gt;set_blocking</ref></p>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_read_callback' homogen-type='method'> <method name='set_read_callback'> </method> <doc placeholder='true'>
2f590d1996-12-03Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_read_callback</tt> - set the read callback</p>
2f590d1996-12-03Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_read_callback(function read_callback)<br/>
2f590d1996-12-03Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the read callback for the file. The read callback is called whenever there is data to read from the file. Note that this function does not set the file nonblocking.</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_write_callback' homogen-type='method'> <method name='set_write_callback'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_write_callback</tt> - set the write callback</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void file-&gt;set_write_callback(function write_callback)<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the write callback for the file. The write callback is called whenever there is buffer space available to write to for the file. Note that this function does not set the file nonblocking.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;set_nonblocking'>&gt;file-&gt;set_nonblocking</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='stat' homogen-type='method'> <method name='stat'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>stat</tt> - do file_stat on an open file</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int *file-&gt;stat();<br/> </p> </tt> <p>This function returns the same information as the efun file_stat, but for the file it is called in. If file is not an open file, zero will be returned. Zero is also returned if file is a pipe or socket.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref resolved='predef::file_stat' to='file_stat'>file_stat</ref></p> </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
f60b931998-12-17Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-type='method'> <method name='tcgetattr'> <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>mapping </object></returntype>
f60b931998-12-17Mirar (Pontus Hagland)  <arguments> </arguments> </method><method name='tcsetattr'> <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>int </object></returntype>
f60b931998-12-17Mirar (Pontus Hagland)  <arguments><argument name='attr'><type><mapping/></type></argument> </arguments> </method><method name='tcsetattr'> <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>int </object></returntype>
f60b931998-12-17Mirar (Pontus Hagland)  <arguments><argument name='attr'><type><mapping/></type></argument> <argument name='when'><type><string/></type></argument> </arguments> </method><doc> <text> <p>gets/sets term attributes</p> <p>the returned value/the parameter is a mapping on the form <pre>
96d4771998-12-18Mirar (Pontus Hagland)  "ispeed": baud rate "ospeed": baud rate "csize": character size (5,6,7 or 8) "rows": terminal rows "columns": terminal columns flag: 0 or 1 control char:value
f60b931998-12-17Mirar (Pontus Hagland)  ... </pre> where 'flag' is the string describing the termios (input, output, control and local mode) flags (see the manpage for termios or the tutorial).</p>
96d4771998-12-18Mirar (Pontus Hagland) <p>Note that tcsetattr always _changes_ the attributes; correct use to set a flag would be something like: <tt>fd-&gt;tcsetattr((["myflag":1]));</tt></p>
f60b931998-12-17Mirar (Pontus Hagland)  <p>the argument 'when' to tcsetattr describes when the changes are to take effect: "TCSANOW": the change occurs immediately (default); "TCSADRAIN": the change occurs after all output has been written; "TCSAFLUSH": the change occurs after all output has been written,
96d4771998-12-18Mirar (Pontus Hagland) and empties input buffers.</p> <p>Example for setting the terminal in raw mode: Stdio.stdin-&gt;tcsetattr((["ECHO":0,"ICANON":0,"VMIN":0,"VTIME":0]));</p> <p>Note: Unknown flags are ignored by tcsetattr(). Terminal rows and columns settring by tcsetattr() is not currently supported.
f60b931998-12-17Mirar (Pontus Hagland) </p> </text> <group><returns/><text> <p>0 if failed.</p> </text></group>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='tell' homogen-type='method'> <method name='tell'> </method> <doc placeholder='true'>
362e881996-10-15Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>tell</tt> - tell where we are in a file</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;tell();<br/>
9118d41997-02-06Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Return the current position in the file.</p> </text>
362e881996-10-15Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;seek'>&gt;file-&gt;seek</ref></p>
362e881996-10-15Fredrik Hübinette (Hubbe) </text></group> </doc>
9118d41997-02-06Fredrik Hübinette (Hubbe) </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='write' homogen-type='method'> <method name='write'> </method> <doc placeholder='true'>
362e881996-10-15Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>write</tt> - write data to a file or stream</p>
362e881996-10-15Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int file-&gt;write(string <i>data</i>);<br/>
362e881996-10-15Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Write data to file or stream and return how many bytes that was actually written. -1 is returned if something went wrong and no bytes had been written.</p> </text>
9118d41997-02-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;read'>&gt;file-&gt;read</ref></p>
9118d41997-02-06Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) </class></module></namespace></autodoc>
4378f62021-03-17Tobias S. Josefowitz  <insert-move entity='Stdio.FILE'/>
33402e1997-02-11Fredrik Hübinette (Hubbe) <!-- <insert-move entity="Stdio.stdin"/> --> <!-- <insert-move entity="Stdio.stdout"/> --> <!-- <insert-move entity="Stdio.stderr"/> --> <autodoc hidden='1'><namespace hidden='1' name='predef'><module hidden='1' name='Stdio'><class name='Port'> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>Stdio.Port</tt> - a program for handling and listening to open ports</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Stdio.Port is a precompiled program that handles listening to sockets. Whenever you need a bound socket that is open and listens for connections you should use this program.
9118d41997-02-06Fredrik Hübinette (Hubbe) </p>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Here follow the diescriptionsof the functions in Stdio.Port:
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p/> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  </doc>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='accept' homogen-type='method'> <method name='accept'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>accept</tt> - accept a connection</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>object port-&gt;accept();<br/>
7491fd1995-10-11Fredrik Hübinette (Hubbe) </p>
9118d41997-02-06Fredrik Hübinette (Hubbe) </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function completes a connection made from a remote machine to this port. It returns a two-way stream in the form of a copy of Stdio.File. The new file is by default set to blocking.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref resolved='predef::Stdio.File' to='Stdio.File'>Stdio.File</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='bind' homogen-type='method'> <method name='bind'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>bind</tt> - open socket and bind it to a port</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int port-&gt;bind(int <i>port</i>);<br/> or<br/> int port-&gt;bind(int <i>port</i>,function <i>accept_callback</i>);<br/> or<br/> int port-&gt;bind(int <i>port</i>,function <i>accept_callback</i>, string <i>ip</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>Bind opens a sockets and binds it to port number on the local machine. If the second argument is present, the socket is set to nonblocking and the callback funcition is called whenever something connects to the socket. The callback will receive the id for this port as argument. Bind returns 1 on success, and zero on failiure. </p> <p>If the optional argument 'ip' is given, bind will try to bind to this ip name (or number).</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='port-&gt;accept'>&gt;port-&gt;accept</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='create' homogen-type='method'> <method name='create'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>create</tt> - create and/or setup a port</p>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void port-&gt;create("stdin")<br/> or<br/> void port-&gt;create("stdin",function accept_callback)<br/> or<br/> void port-&gt;create("stdin",function accept_callback)<br/> or<br/> void port-&gt;create(int port)<br/> or<br/> void port-&gt;create(int port,function accept_callback)<br/> or<br/> void port-&gt;create(int port,function accept_callback, string ip)<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>When create is called with 'stdin' as argument, a socket is created out of the file descriptor 0. This is only useful if that actually IS a socket to begin with. When create is called with an int as first argument, it does the same as bind() would do with the same arguments.</p> </text>
a1c5881995-08-09Fredrik Hübinette (Hubbe)  <group><seealso/><text>
02866a1997-02-13Niels Möller <p><ref to='Builtin.clone'>Builtin.clone</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='errno' homogen-type='method'> <method name='errno'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>errno</tt> - return the last error</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int port-&gt;errno();<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>If the last call done on this port failed, errno will return an integer describing what went wrong. Refer to your unix manual for further information.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text> <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='file-&gt;errno'>&gt;file-&gt;errno</ref></p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group> </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='listen_fd' homogen-type='method'> <method name='listen_fd'> </method> <doc placeholder='true'>
a1c5881995-08-09Fredrik Hübinette (Hubbe) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>listen_fd</tt> - listen to an already open port</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>int port-&gt;listen_fd(int <i>fd</i>);<br/> or<br/> int port-&gt;listen_fd(int <i>fd</i>,function <i>accept_callback</i>);<br/>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function does the same as port-&gt;bind, except that instead of creating a new socket and bind it to a port, it expects that the filedescriptor 'fd' is an already open port.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text>
9118d41997-02-06Fredrik Hübinette (Hubbe) <group><note/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function is only for the advanced user, and is generally used when sockets are passed to Pike at exec time.</p>
a1c5881995-08-09Fredrik Hübinette (Hubbe) </text></group>
9118d41997-02-06Fredrik Hübinette (Hubbe) <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='port-&gt;bind'>&gt;port-&gt;bind</ref> and <ref to='port-&gt;accept'>&gt;port-&gt;accept</ref></p>
a9858a1996-10-13Mirar (Pontus Hagland) </text></group> </doc>
9118d41997-02-06Fredrik Hübinette (Hubbe) </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='query_id' homogen-type='method'> <method name='query_id'> </method> <doc placeholder='true'>
a9858a1996-10-13Mirar (Pontus Hagland) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>query_id</tt> - Return the id for this port.</p>
a9858a1996-10-13Mirar (Pontus Hagland) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>mixed port-&gt;query_id();<br/>
a9858a1996-10-13Mirar (Pontus Hagland) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function returns the id for this port. The id is normally the first argument to accept_callback.</p>
a9858a1996-10-13Mirar (Pontus Hagland) </text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <group><seealso/><text> <p><ref to='port-&gt;set_id'>&gt;port-&gt;set_id</ref></p> </text></group>
9118d41997-02-06Fredrik Hübinette (Hubbe) 
a9858a1996-10-13Mirar (Pontus Hagland) </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) <docgroup homogen-name='set_id' homogen-type='method'> <method name='set_id'> </method> <doc placeholder='true'>
a9858a1996-10-13Mirar (Pontus Hagland) <text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><tt>set_id</tt> - set the id of a port</p>
a9858a1996-10-13Mirar (Pontus Hagland) 
33402e1997-02-11Fredrik Hübinette (Hubbe) <tt><p>void port-&gt;set_id(mixed <i>id</i>);<br/>
a9858a1996-10-13Mirar (Pontus Hagland) </p> </tt>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p>This function sets the id used for accept_callback by this port. The default id is this_object().</p> </text>
9118d41997-02-06Fredrik Hübinette (Hubbe)  <group><seealso/><text>
33402e1997-02-11Fredrik Hübinette (Hubbe) <p><ref to='port-&gt;query_id'>&gt;port-&gt;query_id</ref></p>
9118d41997-02-06Fredrik Hübinette (Hubbe) </text></group>
a9858a1996-10-13Mirar (Pontus Hagland)  </doc> </docgroup>
33402e1997-02-11Fredrik Hübinette (Hubbe) </class></module></namespace></autodoc>
4378f62021-03-17Tobias S. Josefowitz  <insert-move entity='Stdio.UDP'/> <insert-move entity='Stdio.Terminfo'/> <insert-move entity='Stdio.Readline'/>
33402e1997-02-11Fredrik Hübinette (Hubbe)  <autodoc hidden='1'><namespace hidden='1' name='predef'><module name='Stdio'>
a9858a1996-10-13Mirar (Pontus Hagland) 
33402e1997-02-11Fredrik Hübinette (Hubbe) </module></namespace></autodoc> </chapter> </file> <file name='./traditional_manual/chapter_3.html'> <chapter number='3' title='Specific Datatype Modules'>
4378f62021-03-17Tobias S. Josefowitz  <insert-move entity='String'/> <insert-move entity='Array'/>
33402e1997-02-11Fredrik Hübinette (Hubbe) <!-- <insert-move entity="Mapping"/> --> <!-- <insert-move entity="Multiset"/> -->
fdfbe02000-11-21Johan Sundström  <autodoc hidden='1'><namespace hidden='1' name='predef'><module name='Function'> <docgroup homogen-name='' homogen-type='import'> <import name=''><classname resolved='predef::'>predef::</classname></import> </docgroup> <docgroup homogen-name='splice_call' homogen-type='method'><doc><text><p>Calls the given function with the <tt>args</tt> array plus the optional extra arguments as its arguments and returns the result.</p> <p> Most useful in conjunction with <ref>map</ref>, and particularly in combination with <ref>sscanf</ref> with <tt>"...%{...%}..."</tt> scan strings (which indeed was what it was invented for in the first place).</p> </text><group><example/><text><p>class Product(string name, string version) { string _sprintf() { return sprintf("Product(%s/%s)", name, version); } } map(({ ({ "pike", "7.1.11" }), ({ "whitefish", "0.1" }) }), Function.splice_call, Product); ({ /* 2 elements */ Product(pike/7.1.11), Product(whitefish/0.1) })</p> </text></group></doc> <method name='splice_call'> <arguments><argument name='args'><type><array/></type></argument><argument name='f'><type><function/></type></argument><argument name='extra'><type><varargs><or><mixed/><void/></or></varargs></type></argument></arguments> <returntype><mixed/></returntype> </method> </docgroup> </module></namespace></autodoc>
4378f62021-03-17Tobias S. Josefowitz  <insert-move entity='Program'/> <insert-move entity='ADT'/>
33402e1997-02-11Fredrik Hübinette (Hubbe)  </chapter> </file> <file name='./traditional_manual/chapter_4.html'> <chapter number='4' title='Image Module'>
1755091999-04-13Mirar (Pontus Hagland)  <autodoc hidden='1'><namespace hidden='1' name='predef'><module hidden='1' name='Image'><class name='Image'>
44aff01999-02-24Mirar (Pontus Hagland) <doc> <text> <p>
1755091999-04-13Mirar (Pontus Hagland) The main object of the <ref resolved='predef::Image.Image'>Image</ref> module, this object is used as drawing area, mask or result of operations.</p>
44aff01999-02-24Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) <p>basic: <br/> <ref resolved='predef::Image.Image.clear'>clear</ref>, <ref resolved='predef::Image.Image.clone'>clone</ref>, <ref resolved='predef::Image.Image.create'>create</ref>, <ref resolved='predef::Image.Image.xsize'>xsize</ref>, <ref resolved='predef::Image.Image.ysize'>ysize</ref></p>
44aff01999-02-24Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) <p>plain drawing: <br/> <ref resolved='predef::Image.Image.box'>box</ref>, <ref resolved='predef::Image.Image.circle'>circle</ref>, <ref resolved='predef::Image.Image.getpixel'>getpixel</ref>, <ref resolved='predef::Image.Image.line'>line</ref>, <ref resolved='predef::Image.Image.setcolor'>setcolor</ref>, <ref resolved='predef::Image.Image.setpixel'>setpixel</ref>, <ref resolved='predef::Image.Image.threshold'>threshold</ref>,
3250c11999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.polyfill'>polyfill</ref></p>
1755091999-04-13Mirar (Pontus Hagland)  <p>operators: <br/>
3250c11999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`=='>`==</ref>, <ref resolved='predef::Image.Image.`&gt;'>&gt;`&gt;</ref>, <ref resolved='predef::Image.Image.`&lt;'>&lt;`&lt;</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref></p>
1755091999-04-13Mirar (Pontus Hagland) 
533b041999-04-16Mirar (Pontus Hagland) <p>pasting images: <br/>
3250c11999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.paste'>paste</ref>, <ref resolved='predef::Image.Image.paste_alpha'>paste_alpha</ref>, <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref>, <ref resolved='predef::Image.Image.paste_mask'>paste_mask</ref></p>
1755091999-04-13Mirar (Pontus Hagland)  <p>getting subimages, scaling, rotating: <br/> <ref resolved='predef::Image.Image.autocrop'>autocrop</ref>, <ref resolved='predef::Image.Image.clone'>clone</ref>, <ref resolved='predef::Image.Image.copy'>copy</ref>,
3250c11999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.dct'>dct</ref>, <ref resolved='predef::Image.Image.mirrorx'>mirrorx</ref>, <ref resolved='predef::Image.Image.rotate'>rotate</ref>, <ref resolved='predef::Image.Image.rotate_ccw'>rotate_ccw</ref>, <ref resolved='predef::Image.Image.rotate_cw'>rotate_cw</ref>, <ref resolved='predef::Image.Image.rotate_expand'>rotate_expand</ref>, <ref resolved='predef::Image.Image.scale'>scale</ref>, <ref resolved='predef::Image.Image.skewx'>skewx</ref>, <ref resolved='predef::Image.Image.skewx_expand'>skewx_expand</ref>, <ref resolved='predef::Image.Image.skewy'>skewy</ref>, <ref resolved='predef::Image.Image.skewy_expand'>skewy_expand</ref></p>
1755091999-04-13Mirar (Pontus Hagland)  <p>calculation by pixels: <br/> <ref resolved='predef::Image.Image.apply_matrix'>apply_matrix</ref>, <ref resolved='predef::Image.Image.change_color'>change_color</ref>, <ref resolved='predef::Image.Image.color'>color</ref>, <ref resolved='predef::Image.Image.distancesq'>distancesq</ref>, <ref resolved='predef::Image.Image.grey'>grey</ref>, <ref resolved='predef::Image.Image.invert'>invert</ref>, <ref resolved='predef::Image.Image.modify_by_intensity'>modify_by_intensity</ref>, <ref resolved='predef::Image.Image.outline'>outline</ref> <ref resolved='predef::Image.Image.select_from'>select_from</ref>, <ref resolved='predef::Image.Image.rgb_to_hsv'>rgb_to_hsv</ref>, <ref resolved='predef::Image.Image.hsv_to_rgb'>hsv_to_rgb</ref>,<br/></p>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.average'>average</ref>, <ref resolved='predef::Image.Image.max'>max</ref>, <ref resolved='predef::Image.Image.min'>min</ref>, <ref resolved='predef::Image.Image.sum'>sum</ref>, <ref resolved='predef::Image.Image.sumf'>sumf</ref>, <ref resolved='predef::Image.Image.find_min'>find_min</ref>, <ref resolved='predef::Image.Image.find_max'>find_max</ref></p>
1755091999-04-13Mirar (Pontus Hagland)  <p>special pattern drawing:<br/>
3250c11999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.noise'>noise</ref>, <ref resolved='predef::Image.Image.turbulence'>turbulence</ref>,
1755091999-04-13Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.test'>test</ref>, <ref resolved='predef::Image.Image.tuned_box'>tuned_box</ref>,
533b041999-04-16Mirar (Pontus Hagland) <ref resolved='predef::Image.Image.gradients'>gradients</ref>, <ref resolved='predef::Image.Image.random'>random</ref>
1755091999-04-13Mirar (Pontus Hagland) </p>
44aff01999-02-24Mirar (Pontus Hagland) </text> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image'>Image</ref>, <ref resolved='predef::Image.Font'>Image.Font</ref>, <ref resolved='predef::Image.Colortable'>Image.Colortable</ref>, <ref resolved='predef::Image.X'>Image.X</ref></p></text></group>
44aff01999-02-24Mirar (Pontus Hagland)  </doc>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
12efa91999-04-22Mirar (Pontus Hagland) <method name='`/'> <returntype> <object>object </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`/'/></type></argument> </arguments> </method><method name='`/'> <returntype> <object>object </object></returntype> <arguments><argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> </arguments> </method><method name='`/'> <returntype> <object>object </object></returntype> <arguments><argument name='value'><type><int/></type></argument> </arguments> </method><method name='`%'> <returntype> <object>object </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`/'/></type></argument> </arguments> </method><method name='`%'> <returntype> <object>object </object></returntype> <arguments><argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> </arguments> </method><method name='`%'> <returntype> <object>object </object></returntype> <arguments><argument name='value'><type><int/></type></argument> </arguments> </method><doc> <text> <p>Divides pixel values and creates a new image from the result or the rest.</p> </text> <group> <param name='operand'/> <text><p>the other image to divide with; the images must have the same size.</p></text></group> <group> <param name='color'/> <param name='value'/> <text><p>if specified as color or value, it will act as a whole image of that color (or value).</p> <p/></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><note/><text> <p>It isn't possible to do a modulo 256 either. (why?)</p> </text></group> <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
12efa91999-04-22Mirar (Pontus Hagland) 
3885b91999-04-11Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`&amp;' homogen-type='method'>&amp; <method name='`&amp;'>&amp;
120ee61999-03-22Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`&amp;'/>&amp;</type></argument>
120ee61999-03-22Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`&amp;'>&amp;
120ee61999-03-22Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`&amp;'>&amp;
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument>
120ee61999-03-22Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>makes a new image out of the minimum pixels values </p>
120ee61999-03-22Mirar (Pontus Hagland) </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='operand'/> <text><p>the other image to compare with; the images must have the same size.</p></text></group>
120ee61999-03-22Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group> <group> <param name='value'/> <text><p>equal to ({value,value,value}).</p></text></group>
120ee61999-03-22Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
120ee61999-03-22Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
120ee61999-03-22Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`*' homogen-type='method'> <method name='`*'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`*'/></type></argument>
66696c1997-11-05Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`*'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`*'>
ea0a4e1998-01-11Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
ab099a2000-05-29Per Hedbor  </arguments> </method><method name='`*'> <returntype> <object>object </object></returntype> <arguments><argument name='value'><type><float/></type></argument>
ea0a4e1998-01-11Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Multiplies pixel values and creates a new image. This can be useful to lower the values of an image, making it greyer, for instance:</p>
ea0a4e1998-01-11Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><pre>image=image*128+64;</pre>
ea0a4e1998-01-11Mirar (Pontus Hagland) </p> </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='operand'/> <text><p>the other image to multiply with; the images must have the same size.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='value'/> <text><p>equal to ({value,value,value}). </p></text></group>
ea0a4e1998-01-11Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
ea0a4e1998-01-11Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
ea0a4e1998-01-11Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`+' homogen-type='method'> <method name='`+'>
ea0a4e1998-01-11Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`+'/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`+'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument> </arguments> </method><method name='`+'> <returntype> <object>object </object></returntype> <arguments><argument name='value'><type><int/></type></argument>
ea0a4e1998-01-11Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>adds two images; values are truncated at 255.</p>
ea0a4e1998-01-11Mirar (Pontus Hagland) </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='operand'/> <text><p>the image which to add.</p></text></group>
ea0a4e1998-01-11Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group> <group> <param name='value'/> <text><p>equal to ({value,value,value}).</p></text></group> <group><returns/><text> <p>the new image object</p> </text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
ea0a4e1998-01-11Mirar (Pontus Hagland) 
446b151998-02-10Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`-' homogen-type='method'> <method name='`-'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`-'/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`-'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`-'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument>
446b151998-02-10Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>makes a new image out of the difference</p>
446b151998-02-10Mirar (Pontus Hagland) </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='operand'/> <text><p>the other image to compare with; the images must have the same size.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='value'/> <text><p>equal to ({value,value,value}).</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
446b151998-02-10Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref>, <ref resolved='predef::Image.Image.min'>min</ref>, <ref resolved='predef::Image.Image.max'>max</ref>, <ref resolved='predef::Image.Image.`=='>`==</ref></p></text></group>
446b151998-02-10Mirar (Pontus Hagland) 
ea0a4e1998-01-11Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='`=='>
4d6a811997-10-27Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`=='/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`=='>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument> </arguments> </method><method name='`=='> <returntype> <object>int </object></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`&lt;'>&lt;
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`=='/></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`&lt;'>&lt; <returntype> <object>int </object></returntype> <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='`&lt;'>&lt; <returntype> <object>int </object></returntype> <arguments><argument name='value'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='`&gt;'>&gt; <returntype> <object>int </object></returntype> <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`=='/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='`&gt;'>&gt; <returntype> <object>int </object></returntype> <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='`&gt;'>&gt; <returntype> <object>int </object></returntype> <arguments><argument name='value'><type><int/></type></argument> </arguments> </method><doc> <text> <p>Compares an image with another image or a color.</p> <p>Comparision is strict and on pixel-by-pixel basis. (Means if not all pixel r,g,b values are correct compared with the corresponding pixel values, 0 is returned.)
4d6a811997-10-27Mirar (Pontus Hagland) </p> </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='operand'/> <text><p>the other image to compare with; the images must have the same size.</p></text></group> <group> <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group>
4d6a811997-10-27Mirar (Pontus Hagland) <group>
1755091999-04-13Mirar (Pontus Hagland)  <param name='value'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>equal to ({value,value,value}).</p> <p/></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>true (1) or false (0).</p> </text></group> <group><note/><text> <p>`&lt; or `&gt; on empty ("no image") image objects or images
c35a4c2000-12-01Fredrik Hübinette (Hubbe) with different size will result in an Pike_error.
3250c11999-04-13Mirar (Pontus Hagland) `== is always true on two empty image objects and always false if one and only one of the image objects is empty or the images differs in size.</p> <p>a&gt;=b and a&lt;=b between objects is equal to !(a&lt;b) and !(a&gt;b), which may not be what you want (since both &lt; and &gt; can return false, comparing the same images).</p>
4d6a811997-10-27Mirar (Pontus Hagland) </text></group>
6a7c211997-11-02Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`|'>`|</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref></p></text></group>
6a7c211997-11-02Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='`|' homogen-type='method'> <method name='`|'>
8322351998-01-11Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='operand'><type><object resolved='predef::Image.Image.`|'/></type></argument>
8322351998-01-11Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`|'>
8322351998-01-11Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='color'><type> <array><valuetype><int/></valuetype></array></type></argument>
8322351998-01-11Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='`|'>
8322351998-01-11Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument>
8322351998-01-11Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>makes a new image out of the maximum pixels values </p> </text> <group> <param name='operand'/> <text><p>the other image to compare with; the images must have the same size.</p></text></group> <group> <param name='color'/> <text><p>an array in format ({r,g,b}), this is equal to using an uniform-colored image.</p></text></group> <group> <param name='value'/> <text><p>equal to ({value,value,value}).</p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><seealso/><text>
d71ce31999-08-12Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.`-'>`-</ref>, <ref resolved='predef::Image.Image.`+'>`+</ref>, <ref resolved='predef::Image.Image.`&amp;'>&amp;`&amp;amp;</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group>
8322351998-01-11Mirar (Pontus Hagland) 
60beed2000-07-27Per Hedbor </doc> </docgroup> <docgroup homogen-name='apply_curve' homogen-type='method'> <method name='apply_curve'> <returntype> <object>object </object></returntype> <arguments><argument name='array(int(0..255'><type> <object resolved='predef::Image.Image.apply_curve'/></type></argument> </arguments> </method><method name='apply_curve'> <returntype> <object>object </object></returntype> <arguments><argument name='array(int(0..255'><type> <object resolved='predef::Image.Image.apply_curve'/></type></argument> </arguments> </method><method name='apply_curve'> <returntype> <object>object </object></returntype> <arguments><argument name='stringchannel'><type> <object resolved='predef::Image.Image.apply_curve'/></type></argument> <argument name='array(int(0..255'><type> <object resolved='predef::Image.Image.apply_curve'/></type></argument> </arguments> </method><doc> <text> <p>Apply a lookup-table on all pixels in an image. If only one curve is passed, use the same curve for red, green and blue. If 'channel' is specified, the curve is only applied to the specified channel.</p> <p/> </text> <group> <param name='curve_r'/> <param name='curve_g'/> <param name='curve_b'/> <param name='curve'/> <text><p>An array with 256 elements, each between 0 and 255. It is used as a look-up table, if the pixel value is 2 and curve[2] is 10, the new pixel value will be 10. </p></text></group> <group> <param name='channel'/> <text><p>one of "red", "green", "blue", "value", "saturation" and "hue". </p></text></group> <group><returns/><text> <p>a new image object</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.gamma'>gamma</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.modify_by_intensity'>modify_by_intensity</ref></p></text></group>
f90e101997-11-03Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='apply_matrix' homogen-type='method'> <method name='apply_matrix'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='apply_matrix'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='apply_matrix'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='div'><type> <or><int/><float/></or></type></argument>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments>
1755091999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Applies a pixel-transform matrix, or filter, to the image.</p>
f90e101997-11-03Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><pre> 2 2 pixel(x,y)= base+ k ( sum sum pixel(x+k-1,y+l-1)*matrix(k,l) ) k=0 l=0 </pre></p> <p>1/k is sum of matrix, or sum of matrix multiplied with div. base is given by r,g,b and is normally black.</p> <p><table><tr><td rowspan='2'> blur (ie a 2d gauss function): <pre> ({({1,2,1}), ({2,5,2}), ({1,2,1})}) </pre> </td><td> <image file='predef.Image.Image.apply_matrix.1.png' height='115' width='80'>image.c0.png</image> </td><td> <image file='predef.Image.Image.apply_matrix.2.png' height='115' width='80'>image.c1.png</image> </td></tr> <tr><td/><td>original</td></tr> <tr><td> sharpen (k&gt;8, preferably 12 or 16): <pre> ({({-1,-1,-1}), ({-1, k,-1}), ({-1,-1,-1})}) </pre> </td><td> <image file='predef.Image.Image.apply_matrix.3.png' height='115' width='80'>image.c2.png</image> </td></tr> <tr><td> edge detect: <pre> ({({1, 1,1}), ({1,-8,1}), ({1, 1,1})}) </pre> </td><td> <image file='predef.Image.Image.apply_matrix.4.png' height='115' width='80'>image.c3.png</image> </td></tr> <tr><td> horisontal edge detect (get the idea): <pre> ({({0, 0,0}), ({1,-2,1}), ({0, 0,0})}) </pre> </td><td> <image file='predef.Image.Image.apply_matrix.5.png' height='115' width='80'>image.c4.png</image> </td></tr> <tr><td rowspan='2'> emboss (might prefer to begin with a <ref resolved='predef::Image.Image.grey'>grey</ref> image): <pre> ({({2, 1, 0}), ({1, 0,-1}), ({0,-1,-2})}), 128,128,128, 3 </pre> </td><td> <image file='predef.Image.Image.apply_matrix.6.png' height='115' width='80'>image.c5.png</image> </td><td> <image file='predef.Image.Image.apply_matrix.7.png' height='115' width='80'>image.c6.png</image> </td></tr> <tr><td/><td>greyed</td></tr></table></p> <p>This function is not very fast. </p>
1755091999-04-13Mirar (Pontus Hagland) </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='array'/> <text><p>the matrix; innermost is a value or an array with red, green, blue values for red, green, blue separation.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>base level of result, default is zero</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='div'/> <text><p>division factor, default is 1.0.</p></text></group> <group><returns/><text> <p>the new image object</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
f90e101997-11-03Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='apply_max' homogen-type='method'> <method name='apply_max'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='apply_max'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
f90e101997-11-03Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='apply_max'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='matrix'><type> <array><valuetype> <array><valuetype> <or><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></valuetype></array></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='div'><type> <or><int/><float/></or></type></argument>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This is the same as apply_matrix, but it uses the maximum instead.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>This function is not very fast.
f90e101997-11-03Mirar (Pontus Hagland) </p> </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='array'/> <text><p>the matrix; innermost is a value or an array with red, green, blue values for red, green, blue separation.</p></text></group> <group> <param name='r'/>
1755091999-04-13Mirar (Pontus Hagland)  <param name='g'/>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='b'/> <text><p>base level of result, default is zero</p></text></group> <group> <param name='div'/> <text><p>division factor, default is 1.0.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
f90e101997-11-03Mirar (Pontus Hagland) </text></group>
691da81999-07-02Mirar (Pontus Hagland) <group><note/><text> <p><b>experimental status</b>; may not be exact the same output in later versions</p> </text></group>
6a7c211997-11-02Mirar (Pontus Hagland)  </doc> </docgroup>
5cef171999-06-21Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='autocrop'>
6a7c211997-11-02Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
6a7c211997-11-02Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='autocrop'>
6a7c211997-11-02Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='border'><type><int/></type></argument>
6a7c211997-11-02Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='autocrop'>
6a7c211997-11-02Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='border'><type><int/></type></argument>
5cef171999-06-21Mirar (Pontus Hagland) <argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument>
6a7c211997-11-02Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='autocrop'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='border'><type><int/></type></argument> <argument name='left'><type><int/></type></argument> <argument name='right'><type><int/></type></argument> <argument name='top'><type><int/></type></argument> <argument name='bottom'><type><int/></type></argument>
6a7c211997-11-02Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='autocrop'>
6a7c211997-11-02Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='border'><type><int/></type></argument> <argument name='left'><type><int/></type></argument> <argument name='right'><type><int/></type></argument> <argument name='top'><type><int/></type></argument> <argument name='bottom'><type><int/></type></argument>
5cef171999-06-21Mirar (Pontus Hagland) <argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> </arguments> </method><method name='find_autocrop'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='find_autocrop'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='border'><type><int/></type></argument> </arguments> </method><method name='find_autocrop'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='border'><type><int/></type></argument> <argument name='left'><type><int/></type></argument> <argument name='right'><type><int/></type></argument> <argument name='top'><type><int/></type></argument> <argument name='bottom'><type><int/></type></argument>
6a7c211997-11-02Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Removes "unneccesary" borders around the image, adds one of its own if wanted to, in selected directions.</p>
6a7c211997-11-02Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>"Unneccesary" is all pixels that are equal -- ie if all the same pixels
5cef171999-06-21Mirar (Pontus Hagland) to the left are the same color, that column of pixels are removed.</p> <p>The find_autocrop() function simply returns x1,y1,x2,y2 for the kept area. (This can be used with <ref resolved='predef::Image.Image.copy'>copy</ref> later.)
6a7c211997-11-02Mirar (Pontus Hagland) </p> </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='border'/> <param name='left'/> <param name='right'/> <param name='top'/> <param name='bottom'/> <text><p>which borders to scan and cut the image; a typical example is removing the top and bottom unneccesary pixels:
5cef171999-06-21Mirar (Pontus Hagland) <pre>img=img-&gt;autocrop(0, 0,0,1,1);</pre> </p></text></group>
6a7c211997-11-02Mirar (Pontus Hagland) <group><returns/><text>
1755091999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
6a7c211997-11-02Mirar (Pontus Hagland) </text></group>
66696c1997-11-05Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.copy'>copy</ref></p></text></group>
4d6a811997-10-27Mirar (Pontus Hagland) 
f90e101997-11-03Mirar (Pontus Hagland) </doc> </docgroup>
1755091999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='average'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><float/></valuetype></array></returntype>
f90e101997-11-03Mirar (Pontus Hagland)  <arguments> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='min'>
f90e101997-11-03Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='max'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='sum'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments> </arguments> </method><method name='sumf'> <returntype> <array><valuetype><float/></valuetype></array></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
f90e101997-11-03Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Gives back the average, minimum, maximum color value, and the sum of all pixel's color value.
1755091999-04-13Mirar (Pontus Hagland) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><note/><text> <p>sum() values can wrap! Most systems only have 31 bits available for positive integers. (Meaning, be careful with images that have more than 8425104 pixels.)</p> <p>average() and sumf() may also wrap, but on a line basis. (Meaning, be careful with images that are wider than 8425104 pixels.) These functions may have a precision problem instead, during to limits in the 'double' C type and/or 'float' Pike type.</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
fcc7482000-04-09Per Hedbor </doc> </docgroup> <docgroup homogen-name='bitscale' homogen-type='method'> <method name='bitscale'> <returntype> <object>object </object></returntype> <arguments><argument name='factor'><type><float/></type></argument> </arguments> </method><method name='bitscale'> <returntype> <object>object </object></returntype> <arguments><argument name='xfactor'><type><float/></type></argument> <argument name='yfactor'><type><float/></type></argument> </arguments> </method><doc> <text> <p>scales the image with a factor, without smoothing. This routine is faster than scale, but gives less correct results</p> </text> <group> <param name='factor'/> <text><p>factor to use for both x and y</p></text></group> <group> <param name='xfactor'/> <param name='yfactor'/> <text><p>separate factors for x and y </p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> </doc> </docgroup> <docgroup homogen-name='bitscale' homogen-type='method'> <method name='bitscale'> <returntype> <object>object </object></returntype> <arguments><argument name='newxsize'><type><int/></type></argument> <argument name='newysize'><type><int/></type></argument> </arguments> </method><method name='bitscale'> <returntype> <object>object </object></returntype> <arguments><argument><value>0</value></argument><argument name='newysize'><type><int/></type></argument> </arguments> </method><method name='bitscale'> <returntype> <object>object </object></returntype> <arguments><argument name='newxsize'><type><int/></type></argument> <argument><value>0</value></argument> </arguments> </method><doc> <text> <p>scales the image to a specified new size, if one of newxsize or newysize is 0, the image aspect ratio is preserved.</p> </text> <group> <param name='newxsize'/> <param name='newysize'/> <text><p>new image size in pixels </p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><note/><text> <p>resulting image will be 1x1 pixels, at least</p> </text></group>
1755091999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='box' homogen-type='method'> <method name='box'>
4d6a811997-10-27Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='box'>
4d6a811997-10-27Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='box'>
4d6a811997-10-27Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='alpha'><type><int/></type></argument>
4d6a811997-10-27Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Draws a filled rectangle on the image.</p>
66696c1997-11-05Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'>
3250c11999-04-13Mirar (Pontus Hagland) <td><image file='predef.Image.Image.box.1.png' height='115' width='80'>image.c7.png</image></td> <td><image file='predef.Image.Image.box.2.png' height='115' width='80'>image.c8.png</image></td>
1755091999-04-13Mirar (Pontus Hagland) </tr><tr> <td>original</td>
3250c11999-04-13Mirar (Pontus Hagland) <td>-&gt;box<br/>(40,10,<br/>10,80,<br/>0,255,0)</td>
1755091999-04-13Mirar (Pontus Hagland) </tr></table>
37d6bc1997-11-11Mirar (Pontus Hagland) </p>
4d6a811997-10-27Mirar (Pontus Hagland) </text>
3f025a1997-11-03Mirar (Pontus Hagland) <group>
1755091999-04-13Mirar (Pontus Hagland)  <param name='x1'/> <param name='y1'/> <param name='x2'/> <param name='y2'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>box corners</p></text></group>
3f025a1997-11-03Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>color of the box</p></text></group>
4d6a811997-10-27Mirar (Pontus Hagland) <group>
1755091999-04-13Mirar (Pontus Hagland)  <param name='alpha'/> <text><p>alpha value</p></text></group> <group><returns/><text> <p>the object called</p>
4d6a811997-10-27Mirar (Pontus Hagland) </text></group>
b1a60f1999-04-12Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='cast' homogen-type='method'> <method name='cast'>
b1a60f1999-04-12Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype> <arguments><argument name='type'><type><string/></type></argument>
b1a60f1999-04-12Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Cast the image to another datatype. Currently supported are string ("rgbrgbrgb...") and array (double array of <ref resolved='predef::Image.Color'>Image.Color</ref> objects).</p> </text> <group><seealso/><text> <p><ref resolved='predef::Image.Color'>Image.Color</ref>, <ref resolved='predef::Image.X'>Image.X</ref></p></text></group>
b1a60f1999-04-12Per Hedbor 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='change_color' homogen-type='method'> <method name='change_color'>
b1a60f1999-04-12Per Hedbor  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='tor'><type><int/></type></argument> <argument name='tog'><type><int/></type></argument> <argument name='tob'><type><int/></type></argument>
b1a60f1999-04-12Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='change_color'>
361d6f1999-04-06Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='fromr'><type><int/></type></argument> <argument name='fromg'><type><int/></type></argument> <argument name='fromb'><type><int/></type></argument> <argument name='inttor'><type> <object resolved='predef::Image.Image.change_color'/></type></argument> <argument name='tog'><type><int/></type></argument> <argument name='tob'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
361d6f1999-04-06Marcus Comstedt  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Changes one color (exakt match) to another. If non-exakt-match is preferred, check <ref resolved='predef::Image.Image.distancesq'>distancesq</ref> and <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref>.</p>
361d6f1999-04-06Marcus Comstedt </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='tor'/> <param name='tog'/> <param name='tob'/> <text><p>destination color and next current color</p></text></group> <group> <param name='fromr'/> <param name='fromg'/> <param name='fromb'/> <text><p>source color, default is current color</p></text></group> <group><returns/><text> <p>a new (the destination) image object</p> </text></group>
361d6f1999-04-06Marcus Comstedt  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='circle' homogen-type='method'> <method name='circle'>
361d6f1999-04-06Marcus Comstedt  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> <argument name='rx'><type><int/></type></argument> <argument name='ry'><type><int/></type></argument> </arguments> </method><method name='circle'> <returntype> <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> <argument name='rx'><type><int/></type></argument> <argument name='ry'><type><int/></type></argument> <argument name='r'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='circle'> <returntype> <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> <argument name='rx'><type><int/></type></argument> <argument name='ry'><type><int/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
361d6f1999-04-06Marcus Comstedt  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Draws a circle on the image. The circle is <i>not</i> antialiased.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Image.circle.1.png' height='115' width='80'>image.c9.png</image></td> <td><image file='predef.Image.Image.circle.2.png' height='115' width='80'>image.c10.png</image></td> </tr><tr> <td>original</td> <td>-&gt;circle<br/>(50,50,<br/>30,50,<br/>0,255,255)</td> </tr></table>
361d6f1999-04-06Marcus Comstedt </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='x'/> <param name='y'/> <text><p>circle center</p></text></group> <group> <param name='rx'/> <param name='ry'/> <text><p>circle radius in pixels</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>color</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='alpha'/> <text><p>alpha value</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the object called</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
361d6f1999-04-06Marcus Comstedt  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='clear' homogen-type='method'> <method name='clear'>
361d6f1999-04-06Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
361d6f1999-04-06Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='clear'>
361d6f1999-04-06Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
361d6f1999-04-06Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='clear'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
fa3d301999-04-09Marcus Comstedt 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>gives a new, cleared image with the same size of drawing area</p>
fa3d301999-04-09Marcus Comstedt 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Image.clear.1.png' height='115' width='80'>image.c11.png</image></td> <td><image file='predef.Image.Image.clear.2.png' height='115' width='80'>image.c12.png</image></td> </tr><tr> <td>original</td> <td>-&gt;clear<br/>(0,128,255)</td> </tr></table> </p> </text> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>color of the new image</p></text></group> <group> <param name='alpha'/> <text><p>new default alpha channel value</p></text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.copy'>copy</ref>, <ref resolved='predef::Image.Image.clone'>clone</ref></p></text></group>
fa3d301999-04-09Marcus Comstedt 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='clone' homogen-type='method'> <method name='clone'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype> <arguments> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='clone'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
fa3d301999-04-09Marcus Comstedt 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='clone'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
fa3d301999-04-09Marcus Comstedt 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='clone'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
361d6f1999-04-06Marcus Comstedt 
1755091999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc>
4fdfd01998-01-16Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Copies to or initialize a new image object.</p>
1755091999-04-13Mirar (Pontus Hagland)  <p><table><tr valign='center'>
3250c11999-04-13Mirar (Pontus Hagland) <td><image file='predef.Image.Image.clone.1.png' height='115' width='80'>image.c13.png</image></td> <td><image file='predef.Image.Image.clone.2.png' height='115' width='80'>image.c14.png</image></td> <td><image file='predef.Image.Image.clone.3.png' height='50' width='50'>image.c15.png</image></td>
1755091999-04-13Mirar (Pontus Hagland) </tr><tr> <td>original</td>
3250c11999-04-13Mirar (Pontus Hagland) <td>clone</td> <td>clone(50,50)</td> </tr></table> </p>
4fdfd01998-01-16Mirar (Pontus Hagland) </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='xsize'/> <param name='ysize'/> <text><p>size of (new) image in pixels, called image is cropped to that size</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='r'/> <param name='g'/> <param name='b'/> <text><p>current color of the new image, default is black. Will also be the background color if the cloned image is empty (no drawing area made).</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='alpha'/> <text><p>new default alpha channel value</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new object</p>
4fdfd01998-01-16Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.copy'>copy</ref>, <ref resolved='predef::Image.Image.create'>create</ref></p></text></group>
4fdfd01998-01-16Mirar (Pontus Hagland)  </doc>
1755091999-04-13Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='color' homogen-type='method'> <method name='color'>
4fdfd01998-01-16Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
4fdfd01998-01-16Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='color'>
08e3981998-01-25Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='value'><type><int/></type></argument>
08e3981998-01-25Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='color'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
08e3981998-01-25Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Colorize an image.</p>
08e3981998-01-25Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The red, green and blue values of the pixels are multiplied with the given value(s). This works best on a grey image...</p> <p>The result is divided by 255, giving correct pixel values.</p> <p>If no arguments are given, the current color is used as factors.</p> <p> <table><tr valign='center'> <td><image file='predef.Image.Image.color.1.png' height='115' width='80'>image.c16.png</image></td> <td><image file='predef.Image.Image.color.2.png' height='115' width='80'>image.c17.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;color(128,128,255);</td> </tr></table>
08e3981998-01-25Mirar (Pontus Hagland) </p> </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='r'/> <param name='g'/> <param name='b'/> <text><p>red, green, blue factors</p></text></group> <group> <param name='value'/> <text><p>factor </p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
08e3981998-01-25Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.grey'>grey</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.modify_by_intensity'>modify_by_intensity</ref></p></text></group>
08e3981998-01-25Mirar (Pontus Hagland) 
e3a67d1998-06-19Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='copy' homogen-type='method'> <method name='copy'>
e3a67d1998-06-19Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
e3a67d1998-06-19Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='copy'>
e3a67d1998-06-19Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument>
e3a67d1998-06-19Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='copy'>
4fdfd01998-01-16Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument> <argument name='r'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
4fdfd01998-01-16Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='copy'>
4fdfd01998-01-16Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument> <argument name='r'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
4fdfd01998-01-16Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Copies this part of the image. The requested area can be smaller, giving a cropped image, or bigger - the new area will be filled with the given or current color.</p> <p><table><tr valign='center'> <td><image file='predef.Image.Image.copy.1.png' height='115' width='80'>image.c18.png</image></td> <td><image file='predef.Image.Image.copy.2.png' height='105' width='70'>image.c19.png</image></td> <td><image file='predef.Image.Image.copy.3.png' height='125' width='90'>image.c20.png</image></td> </tr><tr> <td>original</td> <td>-&gt;copy<br/>(5,5,<br/>XSIZE-6,YSIZE-6)</td> <td>-&gt;copy<br/>(-5,-5,<br/>XSIZE+4,YSIZE+4,<br/>10,75,10)</td> </tr></table>
4fdfd01998-01-16Mirar (Pontus Hagland) </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='x1'/> <param name='y1'/> <param name='x2'/> <param name='y2'/> <text><p>The requested new area. Default is the old image size.</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>color of the new image</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='alpha'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>new default alpha channel value</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>a new image object</p> </text></group> <group><note/><text> <p><ref resolved='predef::Image.Image.clone'>clone</ref>(void) and <ref resolved='predef::Image.Image.copy'>copy</ref>(void) does the same operation </p>
4fdfd01998-01-16Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.clone'>clone</ref>, <ref resolved='predef::Image.Image.autocrop'>autocrop</ref></p></text></group>
4fdfd01998-01-16Mirar (Pontus Hagland) 
cc02261999-04-06Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='create' homogen-type='method'> <method name='create'>
19c0971999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments> </arguments> </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
19c0971999-04-10Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='create'>
19c0971999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
2436f81999-05-20Mirar (Pontus Hagland) <argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> </arguments> </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
19c0971999-04-10Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='create'>
19c0971999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
19c0971999-04-10Per Hedbor 
6cc9f81999-07-16Mirar (Pontus Hagland)  </arguments> </method><method name='create'> <returntype> <object>void </object></returntype> <arguments><argument name='xsize'><type><int/></type></argument> <argument name='ysize'><type><int/></type></argument> <argument name='method'><type><string/></type></argument> <argument name='...'><type> <object resolved='predef::Image.Image.create.method'>method</object></type></argument>
19c0971999-04-10Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Initializes a new image object.</p> <p><table><tr valign='center'> <td><image file='predef.Image.Image.create.1.png' height='115' width='80'>image.c21.png</image></td> <td><image file='predef.Image.Image.create.2.png' height='115' width='80'>image.c22.png</image></td>
1755091999-04-13Mirar (Pontus Hagland) </tr><tr>
3250c11999-04-13Mirar (Pontus Hagland) <td>Image.Image<br/>(XSIZE,YSIZE)</td> <td>Image.Image<br/>(XSIZE,YSIZE,255,128,0)</td> </tr></table></p>
6cc9f81999-07-16Mirar (Pontus Hagland)  <p>The image can also be calculated from some special methods, for convinience:</p> <p><pre> channel modes; followed by a number of 1-char-per-pixel strings or image objects (where red channel will be used), or an integer value: "grey" : make a grey image (needs 1 source: grey) "rgb" : make an rgb image (needs 3 sources: red, green and blue) "cmyk" : make a rgb image from cmyk (cyan, magenta, yellow, black) generate modes; all extra arguments is given to the
6427041999-07-20Fredrik Hübinette (Hubbe) generation function. These has the same name as the method: "&lt;ref&gt;test&lt;/ref&gt;,"
6cc9f81999-07-16Mirar (Pontus Hagland)  "&lt;ref&gt;gradients&lt;/ref&gt;" "&lt;ref&gt;noise&lt;/ref&gt;" "&lt;ref&gt;turbulence&lt;/ref&gt;" "&lt;ref&gt;random&lt;/ref&gt;" "&lt;ref&gt;randomgrey&lt;/ref&gt;" specials cases: "&lt;ref&gt;tuned_box&lt;/ref&gt;" (coordinates is automatic) </pre> </p>
19c0971999-04-10Per Hedbor </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='xsize'/> <param name='ysize'/> <text><p>size of (new) image in pixels</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
2436f81999-05-20Mirar (Pontus Hagland)  <param name='color'/>
1755091999-04-13Mirar (Pontus Hagland)  <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>background color (will also be current color), default color is black</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='alpha'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>default alpha channel value</p></text></group> <group><bugs/><text> <p>SIGSEGVS can be caused if the size is too big, due to unchecked overflow - (xsize*ysize)&amp;MAXINT is small enough to allocate.</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.copy'>copy</ref>, <ref resolved='predef::Image.Image.clone'>clone</ref>, <ref resolved='predef::Image.Image'>Image.Image</ref></p></text></group>
19c0971999-04-10Per Hedbor 
cc02261999-04-06Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='dct' homogen-type='method'> <method name='dct'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='newx'><type><int/></type></argument> <argument name='newy'><type><int/></type></argument>
cc02261999-04-06Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Scales the image to a new size.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Method for scaling is rather complex; the image is transformed via a cosine transform, and then resampled back.</p> <p>This gives a quality-conserving upscale, but the algorithm used is n*n+n*m, where n and m is pixels in the original and new image.</p> <p>Recommended wrapping algorithm is to scale overlapping parts of the image-to-be-scaled.</p> <p>This functionality is actually added as an true experiment, but works...
cc02261999-04-06Per Hedbor </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='newx'/> <param name='newy'/> <text><p>new image size in pixels </p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
cc02261999-04-06Per Hedbor </text></group>
d023e81998-04-01Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Do NOT use this function if you don't know what you're dealing with! Read some signal theory first...</p>
edff021999-04-22Mirar (Pontus Hagland)  <p>It write's dots on stderr, to indicate some sort of progress. It doesn't use any fct (compare: fft) algorithms.</p>
d023e81998-04-01Mirar (Pontus Hagland) </text></group> </doc>
1755091999-04-13Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='distancesq' homogen-type='method'> <method name='distancesq'>
d023e81998-04-01Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
d023e81998-04-01Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='distancesq'>
d023e81998-04-01Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
5e7f771997-11-12Mirar (Pontus Hagland) 
d023e81998-04-01Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Makes an grey-scale image, for alpha-channel use.</p>
d023e81998-04-01Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The given value (or current color) are used for coordinates in the color cube. Each resulting pixel is the distance from this point to the source pixel color, in the color cube, squared, rightshifted 8 steps:</p>
d023e81998-04-01Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><pre> p = pixel color o = given color d = destination pixel d.red=d.blue=d.green= ((o.red-p.red)²+(o.green-p.green)²+(o.blue-p.blue)²)&gt;&gt;8 </pre></p>
d023e81998-04-01Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p> <table><tr valign='center'> <td><image file='predef.Image.Image.distancesq.1.png' height='115' width='80'>image.c23.png</image></td> <td><image file='predef.Image.Image.distancesq.2.png' height='115' width='80'>image.c24.png</image></td> <td><image file='predef.Image.Image.distancesq.3.png' height='115' width='80'>image.c25.png</image></td> <td><image file='predef.Image.Image.distancesq.4.png' height='115' width='80'>image.c26.png</image></td> </tr><tr valign='center'> <td>original</td> <td>distance² to cyan</td> <td>...to purple</td> <td>...to yellow</td> </tr></table></p>
d023e81998-04-01Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p/>
5e7f771997-11-12Mirar (Pontus Hagland) </text>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>red, green, blue coordinates
1755091999-04-13Mirar (Pontus Hagland) </p></text></group> <group><returns/><text> <p>the new image object</p>
d023e81998-04-01Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.select_from'>select_from</ref></p></text></group>
cd257f1998-02-26Mirar (Pontus Hagland) 
d023e81998-04-01Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='find_min'>
d023e81998-04-01Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype> <arguments>
d023e81998-04-01Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='find_max'>
9e9dee1998-05-02Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
d023e81998-04-01Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='find_min'> <returntype> <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
d023e81998-04-01Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='find_max'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Gives back the position of the minimum or maximum pixel value, weighted to grey.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p>
d023e81998-04-01Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>weight of color, default is r=87,g=127,b=41, same as the <ref resolved='predef::Image.Image.grey'>grey</ref>() method.</p></text></group>
d023e81998-04-01Mirar (Pontus Hagland) 
eace241997-11-02Mirar (Pontus Hagland) </doc>
9c0eaf1999-04-13Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='gamma' homogen-type='method'> <method name='gamma'>
eace241997-11-02Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='g'><type><float/></type></argument> </arguments> </method><method name='gamma'> <returntype> <object>object </object></returntype> <arguments><argument name='gred'><type><float/></type></argument> <argument><value>ggreen</value></argument><argument><value>gblue</value></argument>
eace241997-11-02Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Calculate pixels in image by gamma curve.</p> <p>Intensity of new pixels are calculated by:<br/> <i>i</i>' = <i>i</i>^<i>g</i></p> <p>For example, you are viewing your image on a screen with gamma 2.2. To correct your image to the correct gamma value, do something like:</p> <p><tt>my_display_image(my_image()-&gt;gamma(1/2.2);</tt> </p>
eace241997-11-02Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='g'/> <param name='gred'/> <param name='ggreen'/> <param name='gblue'/> <text><p>gamma value </p></text></group>
eace241997-11-02Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>a new image object</p>
eace241997-11-02Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.grey'>grey</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.color'>color</ref></p></text></group>
eace241997-11-02Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='getpixel' homogen-type='method'> <method name='getpixel'>
eace241997-11-02Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><int/></valuetype></array></returntype> <arguments><argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
eace241997-11-02Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p/>
eace241997-11-02Mirar (Pontus Hagland) </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='x'/> <param name='y'/> <text><p>position of the pixel</p></text></group>
eace241997-11-02Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>color of the requested pixel -- ({int red,int green,int blue})</p>
eace241997-11-02Mirar (Pontus Hagland) </text></group>
28e5681999-04-06Per Hedbor </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='gradients' homogen-type='method'> <method name='gradients'>
28e5681999-04-06Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='point'><type> <array><valuetype><int/></valuetype></array></type></argument> <argument name='...'><type> <object resolved='predef::Image.Image.gradients'/></type></argument>
28e5681999-04-06Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='gradients'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>int </object></returntype> <arguments><argument name='point'><type> <array><valuetype><int/></valuetype></array></type></argument> <argument name='...'><type> <object resolved='predef::Image.Image.gradients'/></type></argument> <argument name='floatgrad'><type> <object resolved='predef::Image.Image.gradients'/></type></argument>
28e5681999-04-06Per Hedbor 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p><table><tr valign='center'> <td><image file='predef.Image.Image.gradients.1.png' height='115' width='80'>image.c27.png</image></td> <td><image file='predef.Image.Image.gradients.2.png' height='115' width='80'>image.c28.png</image></td> <td><image file='predef.Image.Image.gradients.3.png' height='115' width='80'>image.c29.png</image></td> <td><image file='predef.Image.Image.gradients.4.png' height='115' width='80'>image.c30.png</image></td> <td><image file='predef.Image.Image.gradients.5.png' height='115' width='80'>image.c31.png</image></td> <td><image file='predef.Image.Image.gradients.6.png' height='115' width='80'>image.c32.png</image></td> </tr><tr> <td>original</td> <td>2 color<br/>gradient</td> <td>10 color<br/>gradient</td> <td>3 colors,<br/>grad=4.0</td> <td>3 colors,<br/>grad=1.0</td> <td>3 colors,<br/>grad=0.25</td> </tr></table> </p> </text> <group><returns/><text> <p>the new image</p> </text></group>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='grey' homogen-type='method'> <method name='grey'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='grey'>
30debc1999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
30debc1999-04-10Per Hedbor  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Makes a grey-scale image (with weighted values).</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p> <table><tr valign='center'> <td><image file='predef.Image.Image.grey.1.png' height='115' width='80'>image.c33.png</image></td> <td><image file='predef.Image.Image.grey.2.png' height='115' width='80'>image.c34.png</image></td> <td><image file='predef.Image.Image.grey.3.png' height='115' width='80'>image.c35.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;grey();</td> <td>-&gt;grey(0,0,255);</td> </tr></table> </p> </text> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>weight of color, default is r=87,g=127,b=41, which should be pretty accurate of what the eyes see... </p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.color'>color</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.modify_by_intensity'>modify_by_intensity</ref></p></text></group> </doc> </docgroup> <docgroup homogen-type='method'> <method name='rgb_to_hsv'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='hsv_to_rgb'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments> </arguments> </method><doc> <text> <p>Converts RGB data to HSV data, or the other way around. When converting to HSV, the resulting data is stored like this: pixel.r = h; pixel.g = s; pixel.b = v;</p> <p>When converting to RGB, the input data is asumed to be placed in the pixels as above.</p> <p> <table><tr valign='center'> <td><image file='predef.Image.Image.rgb_to_hsv.1.png' height='115' width='80'>image.c36.png</image></td> <td><image file='predef.Image.Image.rgb_to_hsv.2.png' height='115' width='80'>image.c37.png</image></td> <td><image file='predef.Image.Image.rgb_to_hsv.3.png' height='115' width='80'>image.c38.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;hsv_to_rgb();</td> <td>-&gt;rgb_to_hsv();</td> </tr><tr valign='center'> <td/> <td/> <td/> </tr><tr valign='center'> <td>tuned box (below)</td> <td>the rainbow (below)</td> <td>same, but rgb_to_hsv()</td> </tr></table></p> <p> HSV to RGB calculation: <pre> in = input pixel out = destination pixel h=-pos*c_angle*3.1415/(float)NUM_SQUARES; out.r=(in.b+in.g*cos(in.r)); out.g=(in.b+in.g*cos(in.r + pi*2/3)); out.b=(in.b+in.g*cos(in.r + pi*4/3)); </pre></p> <p>RGB to HSV calculation: Hmm. <pre> </pre></p> <p> Example: Nice rainbow. <pre> object i = Image.Image(200,200); i = i-&gt;tuned_box(0,0, 200,200, ({ ({ 255,255,128 }), ({ 0,255,128 }), ({ 255,255,255 }), ({ 0,255,255 })})) -&gt;hsv_to_rgb(); </pre></p> </text> <group><returns/><text> <p>the new image object</p> </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='invert' homogen-type='method'> <method name='invert'> <returntype> <object>object </object></returntype> <arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Invert an image. Each pixel value gets to be 255-x, where x is the old value.</p> <p> <table><tr valign='center'> <td><image file='predef.Image.Image.invert.1.png' height='115' width='80'>image.c42.png</image></td> <td><image file='predef.Image.Image.invert.2.png' height='115' width='80'>image.c43.png</image></td> <td><image file='predef.Image.Image.invert.3.png' height='115' width='80'>image.c44.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;invert();</td> <td>-&gt;rgb_to_hsv()-&gt;invert()-&gt;hsv_to_rgb();</td> </tr></table> </p> </text> <group><returns/><text> <p>the new image object</p> </text></group> </doc> </docgroup> <docgroup homogen-name='line' homogen-type='method'> <method name='line'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='line'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument> <argument name='r'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='line'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='x1'><type><int/></type></argument> <argument name='y1'><type><int/></type></argument> <argument name='x2'><type><int/></type></argument> <argument name='y2'><type><int/></type></argument> <argument name='r'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='alpha'><type><int/></type></argument>
30debc1999-04-10Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Draws a line on the image. The line is <i>not</i> antialiased.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Image.line.1.png' height='115' width='80'>image.c45.png</image></td> <td><image file='predef.Image.Image.line.2.png' height='115' width='80'>image.c46.png</image></td> </tr><tr> <td>original</td> <td>-&gt;line<br/>(50,10,<br/>10,50,<br/>255,0,0)</td> </tr></table>
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text> <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='x1'/> <param name='y1'/> <param name='x2'/> <param name='y2'/> <text><p>line endpoints</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>color</p></text></group>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='alpha'/> <text><p>alpha value</p></text></group> <group><returns/><text> <p>the object called</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
30debc1999-04-10Per Hedbor  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='make_ascii' homogen-type='method'> <method name='make_ascii'>
30debc1999-04-10Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype> <arguments><argument name='orient1'><type><object resolved='predef::Image.Image.make_ascii'/></type></argument> <argument name='objectorient2'><type> <object resolved='predef::Image.Image.make_ascii'/></type></argument> <argument name='objectorient3'><type> <object resolved='predef::Image.Image.make_ascii'/></type></argument> <argument name='objectorient4'><type> <object resolved='predef::Image.Image.make_ascii'/></type></argument> <argument name='int|voidxsize'><type> <object resolved='predef::Image.Image.make_ascii'/></type></argument> <argument name='int|voidysize'><type> <object resolved='predef::Image.Image.make_ascii'/></type></argument>
30debc1999-04-10Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This method creates a string that looks like the image. Example: <pre> //Stina is an image with a cat. array(object) Stina4=Stina-&gt;orient4(); Stina4[1]*=215; Stina4[3]*=215; string foo=Stina-&gt;make_ascii(@Stina4,40,4,8); </pre>
30debc1999-04-10Per Hedbor </p> </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>some nice acsii-art.</p> </text></group> <group><note/><text>
691da81999-07-02Mirar (Pontus Hagland) <p><b>experimental status</b>; may not be exact the same output in later versions <pre> | / - \ hue= 0 64 128 192 (=red in an hsv image) </pre></p>
3250c11999-04-13Mirar (Pontus Hagland) </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.orient'>orient</ref>, <ref resolved='predef::Image.Image.orient4'>orient4</ref></p></text></group>
30debc1999-04-10Per Hedbor  </doc>
58cd291998-01-07Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='map_closest'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='colors'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
bbcafb1998-10-31Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='map_fast'>
bbcafb1998-10-31Mirar (Pontus Hagland)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='colors'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='map_fs'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='colors'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='select_colors'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>array </object></returntype> <arguments><argument name='num'><type><int/></type></argument>
bbcafb1998-10-31Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Compatibility functions. Do not use!</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Replacement examples:</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Old code: <pre>img=map_fs(img-&gt;select_colors(200));</pre> New code: <pre>img=Image.Colortable(img,200)-&gt;floyd_steinberg()-&gt;map(img);</pre></p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Old code: <pre>img=map_closest(img-&gt;select_colors(17)+({({255,255,255}),({0,0,0})}));</pre> New code: <pre>img=Image.Colortable(img,19,({({255,255,255}),({0,0,0})}))-&gt;map(img);</pre></p>
bbcafb1998-10-31Mirar (Pontus Hagland) </text> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='match' homogen-type='method'> <method name='match'>
bbcafb1998-10-31Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='scale'><type> <or><int/><float/></or></type></argument> <argument name='objectneedle'><type> <object resolved='predef::Image.Image.match'/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='match'>
bbcafb1998-10-31Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='scale'><type>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <or><int/><float/></or></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='objectneedle'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objecthaystack_cert'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objectneedle_cert'><type> <object resolved='predef::Image.Image.match'/></type></argument> </arguments> </method><method name='match'> <returntype> <object>object </object></returntype> <arguments><argument name='scale'><type>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <or><int/><float/></or></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='objectneedle'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objecthaystack_avoid'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='intfoo'><type> <object resolved='predef::Image.Image.match'/></type></argument> </arguments> </method><method name='match'> <returntype> <object>object </object></returntype> <arguments><argument name='scale'><type>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <or><int/><float/></or></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='objectneedle'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objecthaystack_cert'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objectneedle_cert'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='objecthaystack_avoid'><type> <object resolved='predef::Image.Image.match'/></type></argument> <argument name='intfoo'><type> <object resolved='predef::Image.Image.match'/></type></argument>
bbcafb1998-10-31Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>This method creates an image that describes the match in every pixel in the image and the needle-Image.</p>
bbcafb1998-10-31Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><pre> new pixel value =
920a181999-06-19Fredrik Hübinette (Hubbe)  sum( my_abs(needle_pixel-haystack_pixel))
3250c11999-04-13Mirar (Pontus Hagland) </pre></p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The new image only have the red rgb-part set.</p> <p/>
bbcafb1998-10-31Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='scale'/> <text><p>Every pixel is divided with this value. Note that a proper value here depends on the size of the neadle. </p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='needle'/> <text><p>The image to use for the matching. </p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='haystack_cert'/> <text><p>This image should be the same size as the image itselves. A non-white-part of the haystack_cert-image modifies the output by lowering it. </p></text></group> <group> <param name='needle_cert'/> <text><p>The same, but for the needle-image. </p></text></group> <group> <param name='foo'/> <param name='haystack_avoid'/> <text><p>This image should be the same size as the image itselves. If foo is less than the red value in haystack_avoid the corresponding matching-calculating is not calculated. The avoided parts are drawn in the color 0,100,0. </p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
1279721999-04-06Per Hedbor <group><note/><text>
691da81999-07-02Mirar (Pontus Hagland) <p><b>experimental status</b>; may not be exact the same output in later versions</p>
1279721999-04-06Per Hedbor </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.phasev'>phasev</ref>, <ref resolved='predef::Image.Image.phaseh'>phaseh</ref></p></text></group>
1279721999-04-06Per Hedbor  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='mirrorx' homogen-type='method'> <method name='mirrorx'>
1279721999-04-06Per Hedbor  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
1755091999-04-13Mirar (Pontus Hagland)  <arguments>
1279721999-04-06Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>mirrors an image: <table><tr valign='center'> <td><image file='predef.Image.Image.mirrorx.1.png' height='115' width='80'>matrix.c0.png</image></td> <td><image file='predef.Image.Image.mirrorx.2.png' height='115' width='80'>matrix.c1.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;mirrorx();</td> </tr></table></p>
1279721999-04-06Per Hedbor </text>
1755091999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='mirrory' homogen-type='method'> <method name='mirrory'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype> <arguments> </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>mirrors an image: <table><tr valign='center'> <td><image file='predef.Image.Image.mirrory.1.png' height='115' width='80'>matrix.c2.png</image></td> <td><image file='predef.Image.Image.mirrory.2.png' height='115' width='80'>matrix.c3.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;mirrory();</td> </tr></table>
1755091999-04-13Mirar (Pontus Hagland) </p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text>
1279721999-04-06Per Hedbor  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='modify_by_intensity' homogen-type='method'> <method name='modify_by_intensity'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='v1'><type> <or><int/><array><valuetype><int/></valuetype></array></or></type></argument> <argument><value>...</value></argument><argument name='vn'><type> <or><int/><array><valuetype><int/></valuetype></array></or></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Recolor an image from intensity values.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>For each color an intensity is calculated, from r, g and b factors (see <ref resolved='predef::Image.Image.grey'>grey</ref>), this gives a value between 0 and max.</p> <p>The color is then calculated from the values given, v1 representing the intensity value of 0, vn representing max, and colors between representing intensity values between, linear.</p> <p> <table><tr valign='center'> <td><image file='predef.Image.Image.modify_by_intensity.1.png' height='115' width='80'>image.c47.png</image></td> <td><image file='predef.Image.Image.modify_by_intensity.2.png' height='115' width='80'>image.c48.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;grey()-&gt;modify_by_intensity(1,0,0, 0,({255,0,0}),({0,255,0}));</td> </tr></table>
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text>
1755091999-04-13Mirar (Pontus Hagland) <group> <param name='r'/> <param name='g'/> <param name='b'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>red, green, blue intensity factors</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='v1'/> <param name='vn'/> <text><p>destination color
1755091999-04-13Mirar (Pontus Hagland) </p></text></group> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group> <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.grey'>grey</ref>, <ref resolved='predef::Image.Image.`*'>`*</ref>, <ref resolved='predef::Image.Image.color'>color</ref></p></text></group>
1279721999-04-06Per Hedbor 
5b8c831998-02-13Marcus Comstedt </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='noise' homogen-type='method'> <method name='noise'>
30b3701999-04-11Per Hedbor  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='colorrange'><type> <array><valuetype> <or><float/><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='noise'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>void </object></returntype> <arguments><argument name='colorrange'><type> <array><valuetype> <or><float/><int/><array><valuetype><int/></valuetype></array></or></valuetype></array></type></argument> <argument name='scale'><type><float/></type></argument> <argument name='xdiff'><type><float/></type></argument> <argument name='ydiff'><type><float/></type></argument> <argument name='cscale'><type><float/></type></argument>
30b3701999-04-11Per Hedbor  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Gives a new image with the old image's size, filled width a 'noise' pattern.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The random seed may be different with each instance of pike.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Example: <tt>-&gt;noise( ({0,({255,0,0}), 0.3,({0,255,0}), 0.6,({0,0,255}), 0.8,({255,255,0})}), 0.2,0.0,0.0,1.0 );</tt> <br/><image file='predef.Image.Image.noise.1.png' height='100' width='200'>pattern.c0.png</image>
9c0eaf1999-04-13Mirar (Pontus Hagland) </p>
30b3701999-04-11Per Hedbor </text>
1755091999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='colorrange'/> <text><p>colorrange table</p></text></group> <group> <param name='scale'/> <text><p>default value is 0.1</p></text></group> <group> <param name='xdiff'/> <param name='ydiff'/> <text><p>default value is 0,0</p></text></group> <group> <param name='cscale'/> <text><p>default value is 1</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.turbulence'>turbulence</ref></p></text></group>
30b3701999-04-11Per Hedbor  </doc> </docgroup>
9c0eaf1999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='orient'>
a4d12d1999-04-12Mirar (Pontus Hagland)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument><value>void|array(object)</value></argument>
a4d12d1999-04-12Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='orient4'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <array><valuetype><object resolved='predef::Image.Image.orient'/></valuetype></array></returntype> <arguments>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
9c0eaf1999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Draws images describing the orientation of the current image.</p>
a4d12d1999-04-12Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><tt>orient</tt> gives an HSV image (run a <ref resolved='predef::Image.Image.hsv_to_rgb'>hsv_to_rgb</ref> pass on it to get a viewable image). corresponding to the angle of the orientation: <pre> | / - \ hue= 0 64 128 192 (=red in an hsv image) purple cyan green red </pre> Red, green and blue channels are added and not compared separately.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>If you first use orient4 you can give its output as input to this function.</p> <p>The <tt>orient4</tt> function gives back 4 image objects, corresponding to the amount of different directions, see above.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p> </text> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>an image or an array of the four new image objects</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>experimental status; may not be exact the same output in later versions</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='outline'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype> <arguments>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='outline'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='olr'><type><int/></type></argument> <argument name='olg'><type><int/></type></argument> <argument name='olb'><type><int/></type></argument>
a4d12d1999-04-12Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='outline'>
a4d12d1999-04-12Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='olr'><type><int/></type></argument> <argument name='olg'><type><int/></type></argument> <argument name='olb'><type><int/></type></argument> <argument name='bkgr'><type><int/></type></argument> <argument name='bkgg'><type><int/></type></argument> <argument name='bkgb'><type><int/></type></argument>
5b8c831998-02-13Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='outline'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='outline'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument> <argument name='olr'><type><int/></type></argument> <argument name='olg'><type><int/></type></argument> <argument name='olb'><type><int/></type></argument>
5b8c831998-02-13Marcus Comstedt 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='outline'>
acd38b1998-06-19Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='mask'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument> <argument name='olr'><type><int/></type></argument> <argument name='olg'><type><int/></type></argument> <argument name='olb'><type><int/></type></argument> <argument name='bkgr'><type><int/></type></argument> <argument name='bkgg'><type><int/></type></argument> <argument name='bkgb'><type><int/></type></argument>
acd38b1998-06-19Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='outline_mask'>
acd38b1998-06-19Mirar (Pontus Hagland)  <returntype>
431c431998-12-31Fredrik Hübinette (Hubbe)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments> </arguments> </method><method name='outline_mask'> <returntype> <object>object </object></returntype> <arguments><argument name='bkgr'><type><int/></type></argument> <argument name='bkgg'><type><int/></type></argument> <argument name='bkgb'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='outline_mask'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='mask'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument> </arguments> </method><method name='outline_mask'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type> <array><valuetype> <array><valuetype><int/></valuetype></array></valuetype></array></type></argument> <argument name='bkgr'><type><int/></type></argument> <argument name='bkgg'><type><int/></type></argument> <argument name='bkgb'><type><int/></type></argument>
acd38b1998-06-19Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Makes an outline of this image, ie paints with the given color around the non-background pixels.</p>
acd38b1998-06-19Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Default is to paint above, below, to the left and the right of these pixels.</p> <p>You can also run your own outline mask.</p> <p>The outline_mask function gives the calculated outline as an alpha channel image of white and black instead.</p> <p><table><tr valign='center'> <td><image file='predef.Image.Image.outline.1.png' height='115' width='80'>image.c49.png</image></td> <td><image file='predef.Image.Image.outline.2.png' height='115' width='80'>image.c50.png</image></td> <td><image file='predef.Image.Image.outline.3.png' height='115' width='80'>image.c51.png</image></td> </tr><tr> <td>original</td> <td>masked<br/>through<br/>threshold</td> <td>...and<br/>outlined<br/>with red</td> </tr></table></p> <p/>
acd38b1998-06-19Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='mask'/> <text><p>mask matrix. Default is <tt>({({0,1,0}),({1,1,1}),({0,1,0})})</tt>.</p></text></group> <group> <param name='olr'/> <param name='olg'/> <param name='olb'/> <text><p>outline color. Default is current.</p></text></group> <group> <param name='bkgr'/> <param name='bkgg'/> <param name='bkgb'/> <text><p>background color (what color to outline to); default is color of pixel 0,0.</p></text></group> <group> <param name='div'/> <text><p>division factor, default is 1.0. </p></text></group> <group><returns/><text> <p>the new image object</p>
acd38b1998-06-19Mirar (Pontus Hagland) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>no antialias!</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group> </doc>
3250c11999-04-13Mirar (Pontus Hagland) </docgroup> <docgroup homogen-name='paste' homogen-type='method'> <method name='paste'>
39344f1998-04-09Marcus Comstedt  <returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste'/></type></argument>
39344f1998-04-09Marcus Comstedt  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='paste'>
39344f1998-04-09Marcus Comstedt  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste'/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
39344f1998-04-09Marcus Comstedt  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Pastes a given image over the current image. </p>
39344f1998-04-09Marcus Comstedt </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='image'/> <text><p>image to paste (may be empty, needs to be an image object)</p></text></group> <group> <param name='x'/> <param name='y'/> <text><p>where to paste the image; default is 0,0 </p></text></group> <group><returns/><text> <p>the object called</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.paste_mask'>paste_mask</ref>, <ref resolved='predef::Image.Image.paste_alpha'>paste_alpha</ref>, <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref></p></text></group>
39344f1998-04-09Marcus Comstedt 
bad6031998-03-23Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='paste_alpha' homogen-type='method'> <method name='paste_alpha'> <returntype> <object>object </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste_alpha'/></type></argument> <argument name='alpha'><type><int/></type></argument>
760a4b1998-05-09Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='paste_alpha'> <returntype> <object>object </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste_alpha'/></type></argument> <argument name='alpha'><type><int/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
760a4b1998-05-09Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text> <p>Pastes a given image over the current image, with the specified alpha channel value.</p> <p>An alpha channel value of 0 leaves nothing of the original image in the paste area, 255 is meaningless and makes the given image invisible.
1755091999-04-13Mirar (Pontus Hagland) </p>
bad6031998-03-23Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='image'/> <text><p>image to paste</p></text></group> <group> <param name='alpha'/> <text><p>alpha channel value</p></text></group> <group> <param name='x'/> <param name='y'/> <text><p>where to paste the image; default is 0,0 </p></text></group> <group><returns/><text> <p>the object called</p> </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.paste_mask'>paste_mask</ref>, <ref resolved='predef::Image.Image.paste'>paste</ref>, <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref></p></text></group>
a4d12d1999-04-12Mirar (Pontus Hagland)  </doc>
3250c11999-04-13Mirar (Pontus Hagland) </docgroup> <docgroup homogen-name='paste_alpha_color' homogen-type='method'> <method name='paste_alpha_color'>
a4d12d1999-04-12Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument>
a4d12d1999-04-12Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='paste_alpha_color'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='paste_alpha_color'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> </arguments> </method><method name='paste_alpha_color'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
bad6031998-03-23Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
44500c1999-05-20Mirar (Pontus Hagland) </method><method name='paste_alpha_color'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument> <argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> </arguments> </method><method name='paste_alpha_color'> <returntype> <object>object </object></returntype> <arguments><argument name='mask'><type><object resolved='predef::Image.Image.paste_alpha_color'/></type></argument> <argument name='color'><type> <object resolved='predef::Image.Color'>Color</object></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> </arguments>
1755091999-04-13Mirar (Pontus Hagland) </method><doc>
2a605f1999-01-23Mirar (Pontus Hagland) <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Pastes a given color over the current image, using the given mask as opaque channel.</p>
11aad21999-01-24Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>A pixel value of 255 makes the result become the color given, 0 doesn't change anything.</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The masks red, green and blue values are used separately. If no color are given, the current is used. </p>
1755091999-04-13Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='mask'/> <text><p>mask image</p></text></group> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>what color to paint with; default is current</p></text></group> <group> <param name='x'/> <param name='y'/> <text><p>where to paste the image; default is 0,0 </p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the object called</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.paste_mask'>paste_mask</ref>, <ref resolved='predef::Image.Image.paste_alpha'>paste_alpha</ref>, <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref></p></text></group>
11aad21999-01-24Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='paste_mask' homogen-type='method'> <method name='paste_mask'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste_mask'/></type></argument> <argument name='mask'><type><object resolved='predef::Image.Image.paste_mask'/></type></argument>
11aad21999-01-24Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='paste_mask'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='image'><type><object resolved='predef::Image.Image.paste_mask'/></type></argument> <argument name='mask'><type><object resolved='predef::Image.Image.paste_mask'/></type></argument> <argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument>
f499cd1999-01-24Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Pastes a given image over the current image, using the given mask as opaque channel.</p> <p>A pixel value of 255 makes the result become a pixel from the given image, 0 doesn't change anything.</p> <p>The masks red, green and blue values are used separately.
2a605f1999-01-23Mirar (Pontus Hagland) </p> </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group> <param name='image'/>
3250c11999-04-13Mirar (Pontus Hagland) <text><p>image to paste</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='mask'/> <text><p>mask image</p></text></group> <group> <param name='x'/> <param name='y'/> <text><p>where to paste the image; default is 0,0 </p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the object called</p>
11aad21999-01-24Mirar (Pontus Hagland) </text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><seealso/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p><ref resolved='predef::Image.Image.paste'>paste</ref>, <ref resolved='predef::Image.Image.paste_alpha'>paste_alpha</ref>, <ref resolved='predef::Image.Image.paste_alpha_color'>paste_alpha_color</ref></p></text></group>
2a605f1999-01-23Mirar (Pontus Hagland)  </doc>
1755091999-04-13Mirar (Pontus Hagland) </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='phaseh'>
11aad21999-01-24Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments>
11aad21999-01-24Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='phasev'>
11aad21999-01-24Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
11aad21999-01-24Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='phasevh'>
11aad21999-01-24Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments> </arguments> </method><method name='phasehv'> <returntype> <object>object </object></returntype> <arguments>
11aad21999-01-24Mirar (Pontus Hagland)  </arguments>
1755091999-04-13Mirar (Pontus Hagland) </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Draws images describing the phase of the current image. phaseh gives the horizontal phase and phasev the vertical phase.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><tt>phaseh</tt> gives an image
691da81999-07-02Mirar (Pontus Hagland) where
9c0eaf1999-04-13Mirar (Pontus Hagland) <pre>
3250c11999-04-13Mirar (Pontus Hagland)  max falling min rising value= 0 64 128 192
9c0eaf1999-04-13Mirar (Pontus Hagland) </pre></p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>0 is set if there is no way to determine if it is rising or falling. This is done for the every red, green and blue part of the image.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>Phase images can be used to create ugly effects or to find meta-information
691da81999-07-02Mirar (Pontus Hagland) in the orginal image.</p> <p><table border='0'> <tr> <td><image file='predef.Image.Image.phaseh.1.png' height='115' width='80'>search.c0.png</image></td> <td><image file='predef.Image.Image.phaseh.2.png' height='115' width='80'>search.c1.png</image></td> <td><image file='predef.Image.Image.phaseh.3.png' height='115' width='80'>search.c2.png</image></td> <td><image file='predef.Image.Image.phaseh.4.png' height='115' width='80'>search.c3.png</image></td> <td><image file='predef.Image.Image.phaseh.5.png' height='115' width='80'>search.c4.png</image></td> </tr> <tr> <td>original </td> <td>phaseh() </td> <td>phasev() </td> <td>phasevh()</td> <td>phasehv()</td> </tr> </table>
3250c11999-04-13Mirar (Pontus Hagland) </p>
1755091999-04-13Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
9c0eaf1999-04-13Mirar (Pontus Hagland) </text></group>
1755091999-04-13Mirar (Pontus Hagland) <group><note/><text>
691da81999-07-02Mirar (Pontus Hagland) <p><b>experimental status</b>; may not be exact the same
3250c11999-04-13Mirar (Pontus Hagland) output in later versions</p> </text></group> <group><bugs/><text> <p>0 should not be set as explained above.</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='polyfill' homogen-type='method'> <method name='polyfill'>
11aad21999-01-24Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='curve'><type><varargs> <array><valuetype> <or><int/><float/></or></valuetype></array></varargs></type></argument>
11aad21999-01-24Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>fills an area with the current color
2a605f1999-01-23Mirar (Pontus Hagland) </p> </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='curve'/> <text><p>curve(s), <tt>({x1,y1,x2,y2,...,xn,yn})</tt>, automatically closed.</p> <p>If any given curve is inside another, it will make a hole.
9c0eaf1999-04-13Mirar (Pontus Hagland) </p></text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the current object</p> </text></group>
11aad21999-01-24Mirar (Pontus Hagland) <group><note/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Lines in the polygon may <i>not</i> be crossed without the crossing coordinate specified in both lines. </p> </text></group> <group><bugs/><text> <p>Inverted lines reported on Intel and Alpha processors. </p>
11aad21999-01-24Mirar (Pontus Hagland) </text></group>
3250c11999-04-13Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.setcolor'>setcolor</ref></p></text></group>
2a605f1999-01-23Mirar (Pontus Hagland)  </doc>
11aad21999-01-24Mirar (Pontus Hagland) </docgroup>
6cc9f81999-07-16Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='random'>
11aad21999-01-24Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
2a605f1999-01-23Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='random'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='seed'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
6cc9f81999-07-16Mirar (Pontus Hagland)  </arguments> </method><method name='randomgrey'> <returntype> <object>object </object></returntype> <arguments> </arguments> </method><method name='random'> <returntype> <object>object </object></returntype> <arguments><argument name='seed'><type> <object>greyint</object></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>Gives a randomized image;<br/> <table><tr valign='center'> <td><image file='predef.Image.Image.random.1.png' height='115' width='80'>pattern.c1.png</image></td> <td><image file='predef.Image.Image.random.2.png' height='115' width='80'>pattern.c2.png</image></td> <td><image file='predef.Image.Image.random.3.png' height='115' width='80'>pattern.c3.png</image></td> <td><image file='predef.Image.Image.random.4.png' height='115' width='80'>pattern.c4.png</image></td> <td><image file='predef.Image.Image.random.5.png' height='115' width='80'>pattern.c5.png</image></td> <td><image file='predef.Image.Image.random.6.png' height='115' width='80'>pattern.c6.png</image></td> </tr><tr> <td>original</td> <td>-&gt;random()</td> <td>-&gt;random(17)</td> <td>greyed<br/>(same again)</td> <td>color(red)<br/>(same again)</td> <td>...red channel<br/></td> </tr></table></p>
691da81999-07-02Mirar (Pontus Hagland) <p>Use with -&gt;<ref resolved='predef::Image.Image.grey'>grey</ref>() or -&gt;<ref resolved='predef::Image.Image.color'>color</ref>() for one-color-results.
1755091999-04-13Mirar (Pontus Hagland) </p>
2a605f1999-01-23Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>a new image</p>
2a605f1999-01-23Mirar (Pontus Hagland) </text></group>
691da81999-07-02Mirar (Pontus Hagland) <group><seealso/><text> <p><ref resolved='predef::Image.Image.test'>test</ref>, <ref resolved='predef::Image.Image.noise'>noise</ref></p></text></group>
2a605f1999-01-23Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'> <method name='write_lsb_rgb'>
2a605f1999-01-23Mirar (Pontus Hagland)  <returntype>
1755091999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='what'><type><string/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='write_lsb_grey'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype> <object>object </object></returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <arguments><argument name='what'><type><string/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='read_lsb_rgb'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>string </object></returntype> <arguments> </arguments> </method><method name='read_lsb_grey'> <returntype> <object>string </object></returntype> <arguments>
2a605f1999-01-23Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>These functions read/write in the least significant bit of the image pixel values. The _rgb() functions read/write on each of the red, green and blue values, and the grey keeps the same lsb on all three.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The string is nullpadded or cut to fit. </p>
2a605f1999-01-23Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group> <param name='what'/> <text><p>the hidden message</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the current object or the read string</p>
2a605f1999-01-23Mirar (Pontus Hagland) </text></group> </doc> </docgroup>
9c0eaf1999-04-13Mirar (Pontus Hagland) <docgroup homogen-type='method'>
3250c11999-04-13Mirar (Pontus Hagland) <method name='rotate'>
2a605f1999-01-23Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='angle'><type> <or><int/><float/></or></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
2a605f1999-01-23Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='rotate'>
2a605f1999-01-23Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='angle'><type> <or><int/><float/></or></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
2a605f1999-01-23Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='rotate_expand'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='angle'><type> <or><int/><float/></or></type></argument>
2a605f1999-01-23Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='rotate_expand'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='angle'><type> <or><int/><float/></or></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
2a605f1999-01-23Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Rotates an image a certain amount of degrees (360° is a complete rotation) counter-clockwise:</p>
11aad21999-01-24Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Image.rotate.1.png' height='115' width='80'>matrix.c4.png</image></td> <td><image file='predef.Image.Image.rotate.2.png' height='141' width='113'>matrix.c5.png</image></td> <td><image file='predef.Image.Image.rotate.3.png' height='141' width='113'>matrix.c6.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;rotate(15,255,0,0);</td> <td>-&gt;rotate_expand(15);</td> </tr></table></p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>The "expand" variant of functions stretches the image border pixels rather then filling with the given or current color.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p>This rotate uses the <ref resolved='predef::Image.Image.skewx'>skewx</ref>() and <ref resolved='predef::Image.Image.skewy'>skewy</ref>() functions.</p> </text> <group> <param name='angle'/> <text><p>the number of degrees to rotate</p></text></group> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>color to fill with; default is current</p></text></group> <group><returns/><text> <p>the new image object</p> </text></group>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) </doc> </docgroup> <docgroup homogen-name='rotate_ccw' homogen-type='method'> <method name='rotate_ccw'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments>
2a605f1999-01-23Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>rotates an image counter-clockwise, 90 degrees.</p>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland) <p><table><tr valign='center'> <td><image file='predef.Image.Image.rotate_ccw.1.png' height='115' width='80'>matrix.c7.png</image></td> <td><image file='predef.Image.Image.rotate_ccw.2.png' height='80' width='115'>matrix.c8.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;rotate_ccw();</td> </tr></table>
9c0eaf1999-04-13Mirar (Pontus Hagland) </p>
2a605f1999-01-23Mirar (Pontus Hagland) </text>
3250c11999-04-13Mirar (Pontus Hagland) <group><returns/><text> <p>the new image object</p>
2a605f1999-01-23Mirar (Pontus Hagland) </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='rotate_cw' homogen-type='method'> <method name='rotate_cw'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <arguments>
1755091999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>rotates an image clockwise, 90 degrees.</p> <p><table><tr valign='center'> <td><image file='predef.Image.Image.rotate_cw.1.png' height='115' width='80'>matrix.c9.png</image></td> <td><image file='predef.Image.Image.rotate_cw.2.png' height='80' width='115'>matrix.c10.png</image></td> </tr><tr valign='center'> <td>original</td> <td>-&gt;rotate_cw();</td> </tr></table></p>
1badee1997-05-01Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
1755091999-04-13Mirar (Pontus Hagland) </text></group>
ab91d51997-10-15Mirar (Pontus Hagland) 
1755091999-04-13Mirar (Pontus Hagland) </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='scale' homogen-type='method'> <method name='scale'>
efcffb1999-02-22Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='factor'><type><float/></type></argument>
efcffb1999-02-22Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='scale'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument><value>0.5</value></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='scale'>
efcffb1999-02-22Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='xfactor'><type><float/></type></argument> <argument name='yfactor'><type><float/></type></argument>
efcffb1999-02-22Mirar (Pontus Hagland) 
ab91d51997-10-15Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>scales the image with a factor, 0.5 is an optimized case.</p>
ab91d51997-10-15Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='factor'/> <text><p>factor to use for both x and y</p></text></group>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='xfactor'/> <param name='yfactor'/> <text><p>separate factors for x and y
9c0eaf1999-04-13Mirar (Pontus Hagland) </p></text></group> <group><returns/><text>
3250c11999-04-13Mirar (Pontus Hagland) <p>the new image object</p>
ab91d51997-10-15Mirar (Pontus Hagland) </text></group> </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='scale' homogen-type='method'> <method name='scale'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='newxsize'><type><int/></type></argument> <argument name='newysize'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='scale'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument><value>0</value></argument><argument name='newysize'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='scale'> <returntype> <object>object </object></returntype> <arguments><argument name='newxsize'><type><int/></type></argument> <argument><value>0</value></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p>scales the image to a specified new size, if one of newxsize or newysize is 0, the image aspect ratio is preserved.</p>
1755091999-04-13Mirar (Pontus Hagland) </text>
9c0eaf1999-04-13Mirar (Pontus Hagland) <group>
3250c11999-04-13Mirar (Pontus Hagland)  <param name='newxsize'/> <param name='newysize'/> <text><p>new image size in pixels </p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><note/><text> <p>resulting image will be 1x1 pixels, at least</p> </text></group>
1755091999-04-13Mirar (Pontus Hagland)  </doc> </docgroup>
3250c11999-04-13Mirar (Pontus Hagland) <docgroup homogen-name='select_from' homogen-type='method'> <method name='select_from'>
e298121997-10-12Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='y'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
e298121997-10-12Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='select_from'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='y'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland) <argument name='edge_value'><type><int/></type></argument>
e298121997-10-12Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><doc> <text> <p>Makes an grey-scale image, for alpha-channel use.</p> <p>This is very close to a floodfill.</p> <p>The image is scanned from the given pixel, filled with 255 if the color is the same, or 255 minus distance in the colorcube, squared, rightshifted 8 steps (see <ref resolved='predef::Image.Image.distancesq'>distancesq</ref>).</p> <p>When the edge distance is reached, the scan is stopped. Default edge value is 30. This value is squared and compared with the square of the distance above. </p> </text> <group> <param name='x'/> <param name='y'/> <text><p>originating pixel in the image </p></text></group> <group><returns/><text> <p>the new image object</p> </text></group> <group><seealso/><text> <p><ref resolved='predef::Image.Image.distancesq'>distancesq</ref></p></text></group> </doc> </docgroup> <docgroup homogen-name='setcolor' homogen-type='method'> <method name='setcolor'>
9c0eaf1999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
9c0eaf1999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='setcolor'>
e298121997-10-12Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument> </arguments> </method><doc> <text> <p>set the current color </p> </text> <group> <param name='r'/> <param name='g'/> <param name='b'/> <text><p>new color</p></text></group> <group> <param name='alpha'/> <text><p>new alpha value</p></text></group> <group><returns/><text> <p>the object called</p> </text></group> </doc> </docgroup> <docgroup homogen-name='setpixel' homogen-type='method'> <method name='setpixel'> <returntype> <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='y'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland)  </arguments>
3250c11999-04-13Mirar (Pontus Hagland) </method><method name='setpixel'>
1755091999-04-13Mirar (Pontus Hagland)  <returntype>
3250c11999-04-13Mirar (Pontus Hagland)  <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument>
9c0eaf1999-04-13Mirar (Pontus Hagland) <argument name='y'><type><int/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument>
3250c11999-04-13Mirar (Pontus Hagland)  </arguments> </method><method name='setpixel'> <returntype> <object>object </object></returntype> <arguments><argument name='x'><type><int/></type></argument> <argument name='y'><type><int/></type></argument> <argument name='r'><type><int/></type></argument> <argument name='g'><type><int/></type></argument> <argument name='b'><type><int/></type></argument> <argument name='alpha'><type><int/></type></argument>
1755091999-04-13Mirar (Pontus Hagland) 
e298121997-10-12Mirar (Pontus Hagland)  </arguments> </method><doc> <text>
3250c11999-04-13Mirar (Pontus Hagland) <p> <table><tr valign='center'> <td><image file='predef.Image.Image.setpixel.1.png' height='115' width='80'>image.c52.png</image></td> <td><image file='predef.Image.Image.setpixel.2.png' height='115' width='80'>image.c53.png</image></td> </tr><tr>