<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixwiki.booleansoup.com/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Grayscale - Revision history</title>
		<link>http://fenixwiki.booleansoup.com/index.php?title=Grayscale&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.1</generator>
		<lastBuildDate>Fri, 01 May 2026 08:08:06 GMT</lastBuildDate>
		<item>
			<title>Sandman at 19:12, 14 April 2008</title>
			<link>http://fenixwiki.booleansoup.com/index.php?title=Grayscale&amp;diff=4652&amp;oldid=prev</link>
			<description>&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;</description>
			<pubDate>Mon, 14 Apr 2008 19:12:44 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixwiki.booleansoup.com/index.php/Talk:Grayscale</comments>		</item>
		<item>
			<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>http://fenixwiki.booleansoup.com/index.php?title=Grayscale&amp;diff=4649&amp;oldid=prev</link>
			<description>&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;</description>
			<pubDate>Mon, 14 Apr 2008 19:10:35 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixwiki.booleansoup.com/index.php/Talk:Grayscale</comments>		</item>
	</channel>
</rss>