<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixdocs.com/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=Grayscale</id>
		<title>Grayscale - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=Grayscale"/>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Grayscale&amp;action=history"/>
		<updated>2026-05-01T08:54:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.1</generator>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Grayscale&amp;diff=4652&amp;oldid=prev</id>
		<title>Sandman at 19:12, 14 April 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Grayscale&amp;diff=4652&amp;oldid=prev"/>
				<updated>2008-04-14T19:12:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 19:12, 14 April 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 83:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 83:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;Note that &amp;lt;code&amp;gt;[[rgbscale]](0,map,1,1,1) = [[grayscale]](0,map,0)&amp;lt;/code&amp;gt;.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Note that &amp;lt;code&amp;gt;[[rgbscale]](0,map,1,1,1) = [[grayscale]](0,map,0)&amp;lt;/code&amp;gt; &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;for a valid graphic (0,map)&lt;/ins&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;{{Funcbox&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;{{Funcbox&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  | category=Graphical effects&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  | category=Graphical effects&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;}}&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;}}&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Grayscale&amp;diff=4649&amp;oldid=prev</id>
		<title>Sandman: New page: Category:functions Category:graphical effects  ==Definition== '''INT''' grayscale ( &lt;'''INT''' fileID&gt; , &lt;'''INT''' graphID&gt; , &lt;'''BYTE''' method&gt; )  This will convert the specifie...</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Grayscale&amp;diff=4649&amp;oldid=prev"/>
				<updated>2008-04-14T19:10:35Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/index.php/Category:Functions&quot; title=&quot;Category:Functions&quot;&gt;Category:functions&lt;/a&gt; &lt;a href=&quot;/index.php/Category:Graphical_effects&quot; title=&quot;Category:Graphical effects&quot;&gt;Category:graphical effects&lt;/a&gt;  ==Definition== '''INT''' grayscale ( &amp;lt;'''INT''' fileID&amp;gt; , &amp;lt;'''INT''' graphID&amp;gt; , &amp;lt;'''BYTE''' method&amp;gt; )  This will convert the specifie...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:functions]]&lt;br /&gt;
[[Category:graphical effects]]&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
'''INT''' grayscale ( &amp;lt;'''INT''' fileID&amp;gt; , &amp;lt;'''INT''' graphID&amp;gt; , &amp;lt;'''BYTE''' method&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
This will convert the specified [[graphic]] by using the specified method; see [[#Notes|notes]] for the details.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{|&lt;br /&gt;
| '''INT''' fileID || - The [[fileID]] of the [[file]] that holds the graphics.&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' graphID || - The [[graphID]] of the [[graphic]] to convert.&lt;br /&gt;
|-&lt;br /&gt;
| '''BYTE''' method || - The method used (see [[#Notes|notes]]).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
'''INT'''&lt;br /&gt;
{|&lt;br /&gt;
| -1 || - Invalid graphic.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || - Success.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
{|&lt;br /&gt;
| Unsupported color depth || - The graphic's color depth is not 16bit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
The exact formula is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
c = 0.3 * oldpixel_r + 0.59 * oldpixel_g + 0.11 * oldpixel_b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (c,c,c)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (c,0,0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (0,c,0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (0,0,c)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (c,c,0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (c,0,c)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = (0,c,c)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other methodnumbers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for every pixel:&lt;br /&gt;
    newpixel_rgb = oldpixel_rgb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;[[rgbscale]](0,map,1,1,1) = [[grayscale]](0,map,0)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Funcbox&lt;br /&gt;
  | category=Graphical effects&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>