<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Tileset%2Ftile2360.py</id>
	<title>Tileset/tile2360.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Tileset%2Ftile2360.py"/>
	<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;action=history"/>
	<updated>2026-06-04T02:00:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.5</generator>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=204081&amp;oldid=prev</id>
		<title>Ray Chason: Update this for Python 3</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=204081&amp;oldid=prev"/>
		<updated>2026-05-18T21:11:58Z</updated>

		<summary type="html">&lt;p&gt;Update this for Python 3&lt;/p&gt;
&lt;a href=&quot;https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;amp;diff=204081&amp;amp;oldid=202711&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Ray Chason</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=202711&amp;oldid=prev</id>
		<title>Ray Chason: Note Python 2 requirement</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=202711&amp;oldid=prev"/>
		<updated>2026-05-03T14:49:05Z</updated>

		<summary type="html">&lt;p&gt;Note Python 2 requirement&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 14:49, 3 May 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is a [[wikipedia:Python (programming language)|Python]] program that will take a [[NetHack 3.4.3]] [[tileset]] in BMP format and convert it to a form usable with 3.6.0.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is a [[wikipedia:Python (programming language)|Python]] program that will take a [[NetHack 3.4.3]] [[tileset]] in BMP format and convert it to a form usable with 3.6.0.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This program requires Python 2; it has not been updated for Python 3.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have a [[Mac]] or [[Linux]], you probably already have Python (or can install it with your package manager). Windows users can run this with [https://www.activestate.com/activepython ActiveState Python].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have a [[Mac]] or [[Linux]], you probably already have Python (or can install it with your package manager). Windows users can run this with [https://www.activestate.com/activepython ActiveState Python].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ray Chason</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=131499&amp;oldid=prev</id>
		<title>Aximili: Add category</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=131499&amp;oldid=prev"/>
		<updated>2020-01-26T06:17:33Z</updated>

		<summary type="html">&lt;p&gt;Add category&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:17, 26 January 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l646&quot; &gt;Line 646:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 646:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          rc = 1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          rc = 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sys.exit(rc)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sys.exit(rc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Development]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aximili</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101318&amp;oldid=prev</id>
		<title>Ray Chason: Single and double quotes are more or less interchangeable in Python</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101318&amp;oldid=prev"/>
		<updated>2016-01-29T04:36:39Z</updated>

		<summary type="html">&lt;p&gt;Single and double quotes are more or less interchangeable in Python&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:36, 29 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l611&quot; &gt;Line 611:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 611:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l622&quot; &gt;Line 622:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 622:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ray Chason</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101310&amp;oldid=prev</id>
		<title>Qazmlpok: Undo revision 101309 by Qazmlpok (talk) - Nevermind that's dumb. It'd ruin copying from View Source.</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101310&amp;oldid=prev"/>
		<updated>2016-01-28T16:51:45Z</updated>

		<summary type="html">&lt;p&gt;Undo revision 101309 by &lt;a href=&quot;/wiki/Special:Contributions/Qazmlpok&quot; title=&quot;Special:Contributions/Qazmlpok&quot;&gt;Qazmlpok&lt;/a&gt; (&lt;a href=&quot;/wiki/User_talk:Qazmlpok&quot; title=&quot;User talk:Qazmlpok&quot;&gt;talk&lt;/a&gt;) - Nevermind that&amp;#039;s dumb. It&amp;#039;d ruin copying from View Source.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:51, 28 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l611&quot; &gt;Line 611:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 611:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/del&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog='''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l622&quot; &gt;Line 622:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 622:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/del&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ''')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Qazmlpok</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101309&amp;oldid=prev</id>
		<title>Qazmlpok: ' ' ' is considered wiki syntax and got mangled on the page. Added nowiki as a quick fix. I don't know if there's a &lt;code&gt; tag or anything that'd work better.</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=101309&amp;oldid=prev"/>
		<updated>2016-01-28T16:51:01Z</updated>

		<summary type="html">&lt;p&gt;&amp;#039; &amp;#039; &amp;#039; is considered wiki syntax and got mangled on the page. Added nowiki as a quick fix. I don&amp;#039;t know if there&amp;#039;s a &amp;lt;code&amp;gt; tag or anything that&amp;#039;d work better.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:51, 28 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l611&quot; &gt;Line 611:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 611:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              formatter_class=argparse.RawDescriptionHelpFormatter,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog='''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              epilog=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-width is not specified, it is the image width divided by 40.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --tile-height is not specified, it is equal to the tile width.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l622&quot; &gt;Line 622:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 622:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Multiple images can be converted, but only if --output is not specified.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ''')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              help='Name of a tile set image for NetHack 3.4.3')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Qazmlpok</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=99955&amp;oldid=prev</id>
		<title>Ray Chason: Protected &quot;Tileset/tile2360.py&quot;: Page contains executable code and is protected to discourage trojans ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=99955&amp;oldid=prev"/>
		<updated>2015-12-30T03:17:03Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/wiki/Tileset/tile2360.py&quot; title=&quot;Tileset/tile2360.py&quot;&gt;Tileset/tile2360.py&lt;/a&gt;&amp;quot;: Page contains executable code and is protected to discourage trojans ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 03:17, 30 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ray Chason</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=99954&amp;oldid=prev</id>
		<title>Ray Chason: A handy tool for converting tilesets</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Tileset/tile2360.py&amp;diff=99954&amp;oldid=prev"/>
		<updated>2015-12-30T03:16:02Z</updated>

		<summary type="html">&lt;p&gt;A handy tool for converting tilesets&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;''This page contains a program that is meant to be downloaded and run on the user's computer. Editing is limited to logged-in users to discourage introduction of malicious code.''&lt;br /&gt;
&lt;br /&gt;
Here is a [[wikipedia:Python (programming language)|Python]] program that will take a [[NetHack 3.4.3]] [[tileset]] in BMP format and convert it to a form usable with 3.6.0.&lt;br /&gt;
&lt;br /&gt;
If you have a [[Mac]] or [[Linux]], you probably already have Python (or can install it with your package manager). Windows users can run this with [https://www.activestate.com/activepython ActiveState Python].&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;./tile2360.py -h&amp;lt;/code&amp;gt; for a complete list of options. Most tilesets convert without needing any options; the program assumes that the image contains 40 tiles per row and that tiles are square, unless the tile size is given. The output file name just adds &amp;quot;-360&amp;quot; before the &amp;quot;.bmp&amp;quot; suffix, unless the command line specifies a different name.&lt;br /&gt;
&lt;br /&gt;
New tiles are created as follows:&lt;br /&gt;
&lt;br /&gt;
* Monster tiles are converted to grayscale to form statue tiles. To give better results with tilesets that do not use black backgrounds, the tile is compared to the [[floor]] tile; a pixel that is different from the floor is converted.&lt;br /&gt;
&lt;br /&gt;
* The number of [[scroll origins|scroll appearances]] increases from 25 to 41; tile2360.py repeats the first 16 scroll tiles to make 41.&lt;br /&gt;
&lt;br /&gt;
* The tile for the darkened portion of a [[floor]] is created by halving the luminance of the existing floor tile.&lt;br /&gt;
&lt;br /&gt;
* Eight other tiles are filled in with a placeholder, which appears as a solid red tile with a black X through it. This is for use by tileset authors, who can then fill in the missing tiles. The missing tiles are, in order:&lt;br /&gt;
** [[glob]] of [[gray ooze]], [[brown pudding]], [[green slime]] and [[black pudding]], in that order; this is a block of four missing tiles appearing after the [[meat ring]]&lt;br /&gt;
** [[novel]] -- this is a single missing tile appearing after all the [[spellbook]]s except the [[Book of the Dead]]&lt;br /&gt;
** The [[vibrating square]] -- this is a single missing tile appearing after all the [[trap]]s&lt;br /&gt;
** [[Poison cloud]] and [[valid position]] -- these are two missing tiles appearing after the sparkles&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python&lt;br /&gt;
 # tile2360.py -- convert NetHack 3.4.3 tile sets most of the way to 3.6.0&lt;br /&gt;
 #&lt;br /&gt;
 # Copyright (c) 2015, Ray Chason&lt;br /&gt;
 # All rights reserved.&lt;br /&gt;
 #&lt;br /&gt;
 # Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 # modification, are permitted provided that the following conditions are met:&lt;br /&gt;
 #&lt;br /&gt;
 # 1. Redistributions of source code must retain the above copyright notice, this&lt;br /&gt;
 #    list of conditions and the following disclaimer.&lt;br /&gt;
 #&lt;br /&gt;
 # 2. Redistributions in binary form must reproduce the above copyright notice,&lt;br /&gt;
 #    this list of conditions and the following disclaimer in the documentation&lt;br /&gt;
 #    and/or other materials provided with the distribution.&lt;br /&gt;
 #&lt;br /&gt;
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;br /&gt;
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;br /&gt;
 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;br /&gt;
 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE&lt;br /&gt;
 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR&lt;br /&gt;
 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF&lt;br /&gt;
 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS&lt;br /&gt;
 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN&lt;br /&gt;
 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;br /&gt;
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE&lt;br /&gt;
 # POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
 &lt;br /&gt;
 import argparse&lt;br /&gt;
 import os.path&lt;br /&gt;
 import struct&lt;br /&gt;
 import sys&lt;br /&gt;
 &lt;br /&gt;
 # A Bitmap image, with some extra methods for tile mapping&lt;br /&gt;
 class Bitmap(object):&lt;br /&gt;
     def __init__(self, inpname):&lt;br /&gt;
         # TODO: This assumes the BITMAPINFOHEADER structure. Add support for&lt;br /&gt;
         # other bitmap formats.&lt;br /&gt;
 &lt;br /&gt;
         # Read the header&lt;br /&gt;
         fp = open(inpname, &amp;quot;rb&amp;quot;)&lt;br /&gt;
         header = fp.read(54)&lt;br /&gt;
 &lt;br /&gt;
         (magic,&lt;br /&gt;
         self.bmp_size,&lt;br /&gt;
         reserved,&lt;br /&gt;
         self.image_offset,&lt;br /&gt;
         self.header_size,&lt;br /&gt;
         self.width,&lt;br /&gt;
         self.height,&lt;br /&gt;
         self.num_planes,&lt;br /&gt;
         self.bits_per_pixel,&lt;br /&gt;
         self.compression,&lt;br /&gt;
         self.image_size,&lt;br /&gt;
         self.horiz_res,&lt;br /&gt;
         self.vert_res,&lt;br /&gt;
         self.num_colors,&lt;br /&gt;
         self.num_important_colors) = struct.unpack(&amp;quot;&amp;lt;2s6L2H6L&amp;quot;, header)&lt;br /&gt;
 &lt;br /&gt;
         # Check various header fields for unsupported stuff&lt;br /&gt;
         if magic != &amp;quot;BM&amp;quot;:&lt;br /&gt;
             raise RuntimeError, &amp;quot;%s is not in .BMP format&amp;quot; % inpname&lt;br /&gt;
 &lt;br /&gt;
         if self.header_size != 40:&lt;br /&gt;
             raise RuntimeError, &amp;quot;%s has an unsupported header type (%d)&amp;quot; % \&lt;br /&gt;
                     (inpname, self.header_size)&lt;br /&gt;
 &lt;br /&gt;
         if self.num_planes != 1:&lt;br /&gt;
             raise RuntimeError, &amp;quot;%s has %d planes, not supported&amp;quot; % \&lt;br /&gt;
                     (inpname, self.num_planes)&lt;br /&gt;
 &lt;br /&gt;
         if self.compression != 0:&lt;br /&gt;
             raise RuntimeError, &amp;quot;%s is compressed (%d), and not supported&amp;quot; % \&lt;br /&gt;
                     (inpname, self.compression)&lt;br /&gt;
 &lt;br /&gt;
         if self.bits_per_pixel not in (1, 2, 4, 8, 24, 32):&lt;br /&gt;
             raise RuntimeError, &amp;quot;%s has %d bits per pixel, not supported&amp;quot; % \&lt;br /&gt;
                     (inpname, self.bits_per_pixel)&lt;br /&gt;
 &lt;br /&gt;
         # Read the palette&lt;br /&gt;
         if self.bits_per_pixel &amp;lt;= 8:&lt;br /&gt;
             if self.num_colors == 0:&lt;br /&gt;
                 self.num_colors = 1 &amp;lt;&amp;lt; self.bits_per_pixel&lt;br /&gt;
             self.palette = [ None ] * self.num_colors&lt;br /&gt;
             for i in xrange(0, self.num_colors):&lt;br /&gt;
                 b, g, r, z = struct.unpack(&amp;quot;&amp;lt;4B&amp;quot;, fp.read(4))&lt;br /&gt;
                 self.palette[i] = (b, g, r)&lt;br /&gt;
         else:&lt;br /&gt;
             self.palette = None&lt;br /&gt;
 &lt;br /&gt;
         # Read the pixels&lt;br /&gt;
         fp.seek(self.image_offset)&lt;br /&gt;
         self.image = [ None ] * self.height&lt;br /&gt;
         row_size = ((self.bits_per_pixel * self.width + 31) / 32) * 4&lt;br /&gt;
         if self.bits_per_pixel &amp;lt;= 8:&lt;br /&gt;
             # Palettized image; convert to 24 bit&lt;br /&gt;
             pixels_per_byte = 8 / self.bits_per_pixel&lt;br /&gt;
             mask = (1 &amp;lt;&amp;lt; self.bits_per_pixel) - 1&lt;br /&gt;
             for y in xrange(0, self.height):&lt;br /&gt;
                 row_bytes = fp.read(row_size)&lt;br /&gt;
                 row_bytes = map(&lt;br /&gt;
                         lambda x : struct.unpack('&amp;lt;1B', x)[0],&lt;br /&gt;
                         row_bytes)&lt;br /&gt;
                 row = [ None ] * self.width&lt;br /&gt;
                 self.image[self.height - 1 - y] = row&lt;br /&gt;
                 shift = 8&lt;br /&gt;
                 for x in xrange(0, self.width):&lt;br /&gt;
                     if shift &amp;lt;= 0:&lt;br /&gt;
                         shift = 8&lt;br /&gt;
                     shift -= self.bits_per_pixel&lt;br /&gt;
                     x_hi = x / pixels_per_byte&lt;br /&gt;
                     i = (row_bytes[x_hi] &amp;gt;&amp;gt; shift) &amp;amp; mask&lt;br /&gt;
                     row[x] = self.palette[i]&lt;br /&gt;
         else:&lt;br /&gt;
             # 24 or 32 bits per pixel&lt;br /&gt;
             bytes_per_pixel = self.bits_per_pixel / 8&lt;br /&gt;
             for y in xrange(0, self.height):&lt;br /&gt;
                 row_bytes = fp.read(row_size)&lt;br /&gt;
                 row_bytes = map(&lt;br /&gt;
                         lambda x : struct.unpack('&amp;lt;1B', x)[0],&lt;br /&gt;
                         row_bytes)&lt;br /&gt;
                 row = [ None ] * self.width&lt;br /&gt;
                 self.image[self.height - 1 - y] = row&lt;br /&gt;
                 for x in xrange(0, self.width):&lt;br /&gt;
                     x2 = x * bytes_per_pixel&lt;br /&gt;
                     row[x] = tuple(row_bytes[x2 : x2 + 3])&lt;br /&gt;
         self.bits_per_pixel = 24&lt;br /&gt;
 &lt;br /&gt;
         # These are yet unknown&lt;br /&gt;
         self.tile_width = None&lt;br /&gt;
         self.tile_height = None&lt;br /&gt;
         self.tiles_per_row = None&lt;br /&gt;
         self.tile_rows = None&lt;br /&gt;
         self.tiles = None&lt;br /&gt;
 &lt;br /&gt;
     # Split the image into tiles&lt;br /&gt;
     def split(self, tile_width, tile_height):&lt;br /&gt;
         self.tile_width = tile_width&lt;br /&gt;
         self.tile_height = tile_height&lt;br /&gt;
         self.tiles_per_row = self.width / tile_width&lt;br /&gt;
         self.tile_rows = self.height / tile_height&lt;br /&gt;
         num_tiles = self.tiles_per_row * self.tile_rows&lt;br /&gt;
         self.tiles = [ None ] * num_tiles&lt;br /&gt;
 &lt;br /&gt;
         for t in xrange(0, num_tiles):&lt;br /&gt;
             tile = [ None ] * tile_height&lt;br /&gt;
             self.tiles[t] = tile&lt;br /&gt;
             t_col = t % self.tiles_per_row&lt;br /&gt;
             t_row = t / self.tiles_per_row&lt;br /&gt;
             t_x = t_col * tile_width&lt;br /&gt;
             t_y = t_row * tile_height&lt;br /&gt;
             for y in xrange(0, tile_height):&lt;br /&gt;
                 tile[y] = self.image[t_y + y][t_x : t_x + tile_width]&lt;br /&gt;
 &lt;br /&gt;
     # Rearrange the tiles to match the NetHack 3.6.0 order&lt;br /&gt;
     def remap(self, no_statues):&lt;br /&gt;
         # If tile_map[X] = Y, the tile in position X for 3.6.0 comes from&lt;br /&gt;
         # position Y for 3.4.3. Negative numbers indicate tiles that cannot&lt;br /&gt;
         # be directly mapped.&lt;br /&gt;
         tile_map = [&lt;br /&gt;
             # Monsters&lt;br /&gt;
                0,    1,    2,    3,    4,    5,    6,    7,    8,    9,&lt;br /&gt;
               10,   11,   12,   13,   14,   15,   16,&lt;br /&gt;
             # dingo (19) placed before dog (17)&lt;br /&gt;
               19,   17,   18,&lt;br /&gt;
               20,   21,&lt;br /&gt;
             # winter wolf cub (23) placed before warg (22)&lt;br /&gt;
               23,   22,&lt;br /&gt;
               24,   25,   26,   27,   28,   29,&lt;br /&gt;
               30,   31,   32,   33,   34,   35,   36,   37,   38,   39,&lt;br /&gt;
               40,   41,   42,   43,   44,   45,   46,   47,   48,   49,&lt;br /&gt;
               50,   51,   52,   53,   54,   55,   56,   57,   58,   59,&lt;br /&gt;
               60,   61,   62,   63,   64,   65,   66,   67,   68,   69,&lt;br /&gt;
               70,   71,   72,   73,   74,   75,   76,   77,   78,   79,&lt;br /&gt;
               80,   81,   82,   83,   84,   85,   86,   87,   88,   89,&lt;br /&gt;
               90,   91,   92,   93,   94,   95,   96,   97,   98,   99,&lt;br /&gt;
              100,&lt;br /&gt;
             # pony (104) placed before white unicorn (101)&lt;br /&gt;
              104,  101,  102,  103,&lt;br /&gt;
              105,  106,  107,  108,  109,&lt;br /&gt;
              110,  111,  112,  113,  114,  115,  116,  117,  118,  119,&lt;br /&gt;
              120,  121,  122,  123,  124,  125,  126,  127,  128,  129,&lt;br /&gt;
              130,  131,  132,  133,  134,  135,  136,  137,  138,  139,&lt;br /&gt;
              140,  141,  142,  143,  144,  145,  146,  147,  148,  149,&lt;br /&gt;
              150,  151,  152,  153,  154,  155,  156,  157,  158,  159,&lt;br /&gt;
              160,  161,  162,  163,  164,  165,  166,  167,  168,  169,&lt;br /&gt;
              170,  171,  172,  173,  174,&lt;br /&gt;
             # ettin (176) placed before storm giant (175)&lt;br /&gt;
              176,  175,&lt;br /&gt;
              177,  178,  179,&lt;br /&gt;
              180,  181,  182,  183,  184,  185,  186,  187,  188,  189,&lt;br /&gt;
              190,  191,  192,  193,  194,  195,  196,  197,  198,  199,&lt;br /&gt;
              200,  201,  202,  203,  204,  205,  206,  207,  208,  209,&lt;br /&gt;
             # green slime (211) placed before black pudding (210)&lt;br /&gt;
              211,  210,&lt;br /&gt;
              212,  213,  214,  215,  216,  217,&lt;br /&gt;
             # python (219) placed before pit viper (218)&lt;br /&gt;
              219,  218,&lt;br /&gt;
              220,  221,  222,  223,  224,  225,  226,  227,  228,  229,&lt;br /&gt;
              230,  231,  232,  233,  234,  235,  236,  237,  238,  239,&lt;br /&gt;
              240,  241,  242,  243,  244,  245,  246,  247,&lt;br /&gt;
             # ghoul (249) placed before giant zombie (248)&lt;br /&gt;
              249,  248,&lt;br /&gt;
              250,  251,  252,  253,  254,  255,  256,  257,  258,  259,&lt;br /&gt;
              260,  261,  262,  263,  264,  265,  266,  267,  268,  269,&lt;br /&gt;
              270,  271,  272,&lt;br /&gt;
             # nurse (273) placed after sergeant (281)&lt;br /&gt;
              274,  275,  276,  277,  278,  279,  280,  281,  273,&lt;br /&gt;
              282,  283,  284,  285,  286,  287,  288,  289,&lt;br /&gt;
              290,  291,  292,&lt;br /&gt;
             # succubus (294) placed before horned devil (293)&lt;br /&gt;
              294,  293,&lt;br /&gt;
              295,  296,  297,  298,  299,&lt;br /&gt;
              300,  301,  302,  303,  304,&lt;br /&gt;
             # sandestin (319) placed before balrog (305)&lt;br /&gt;
              319,  305,  306,  307,  308,  309,  310,  311,  312,  313,&lt;br /&gt;
              314,  315,  316,  317,  318,&lt;br /&gt;
              320,  321,  322,  323,  324,  325,  326,  327,  328,  329,&lt;br /&gt;
              330,  331,  332,  333,  334,  335,  336,  337,  338,  339,&lt;br /&gt;
              340,  341,  342,  343,  344,  345,  346,  347,  348,  349,&lt;br /&gt;
              350,  351,  352,  353,  354,  355,  356,  357,  358,  359,&lt;br /&gt;
              360,  361,  362,  363,  364,  365,  366,  367,  368,  369,&lt;br /&gt;
              370,  371,  372,  373,  374,  375,  376,  377,  378,  379,&lt;br /&gt;
              380,  381,  382,  383,  384,  385,  386,  387,  388,  389,&lt;br /&gt;
              390,  391,  392,  393,&lt;br /&gt;
 &lt;br /&gt;
             # Objects:&lt;br /&gt;
                                      394,  395,  396,  397,  398,  399,&lt;br /&gt;
              400,  401,  402,  403,  404,  405,  406,  407,  408,  409,&lt;br /&gt;
              410,  411,  412,  413,  414,  415,  416,  417,  418,  419,&lt;br /&gt;
              420,  421,  422,  423,  424,  425,  426,  427,  428,  429,&lt;br /&gt;
              430,  431,  432,  433,  434,  435,  436,  437,  438,  439,&lt;br /&gt;
              440,  441,  442,  443,  444,  445,  446,  447,  448,  449,&lt;br /&gt;
              450,  451,  452,  453,  454,  455,  456,  457,  458,  459,&lt;br /&gt;
              460,  461,  462,  463,  464,  465,  466,  467,  468,  469,&lt;br /&gt;
              470,  471,  472,  473,  474,  475,  476,  477,  478,  479,&lt;br /&gt;
              480,  481,  482,  483,  484,  485,  486,  487,  488,  489,&lt;br /&gt;
              490,  491,  492,  493,  494,  495,  496,  497,  498,  499,&lt;br /&gt;
              500,  501,  502,  503,  504,  505,  506,  507,  508,  509,&lt;br /&gt;
              510,  511,  512,  513,  514,  515,  516,  517,  518,  519,&lt;br /&gt;
              520,  521,  522,  523,  524,  525,  526,  527,  528,  529,&lt;br /&gt;
              530,  531,  532,  533,  534,  535,  536,  537,  538,  539,&lt;br /&gt;
              540,  541,  542,  543,  544,  545,  546,  547,  548,  549,&lt;br /&gt;
              550,  551,  552,  553,  554,  555,  556,  557,  558,  559,&lt;br /&gt;
              560,  561,  562,  563,  564,  565,  566,  567,  568,  569,&lt;br /&gt;
              570,  571,  572,  573,  574,  575,  576,  577,  578,  579,&lt;br /&gt;
              580,  581,  582,  583,  584,  585,  586,  587,  588,  589,&lt;br /&gt;
              590,  591,  592,  593,  594,  595,  596,  597,  598,  599,&lt;br /&gt;
              600,  601,  602,  603,  604,  605,  606,  607,  608,  609,&lt;br /&gt;
              610,  611,  612,  613,  614,  615,  616,  617,  618,  619,&lt;br /&gt;
              620,  621,  622,  623,  624,  625,  626,  627,  628,  629,&lt;br /&gt;
              630,  631,  632,  633,  634,  635,  636,  637,  638,  639,&lt;br /&gt;
              640,  641,&lt;br /&gt;
               -1, # glob of gray ooze&lt;br /&gt;
               -1, # glob of brown pudding&lt;br /&gt;
               -1, # glob of green slime&lt;br /&gt;
               -1, # glob of black pudding&lt;br /&gt;
              642,  643,  644,  645,  646,  647,  648,  649,&lt;br /&gt;
              650,  651,  652,  653,  654,  655,  656,  657,  658,  659,&lt;br /&gt;
              660,  661,  662,  663,  664,  665,  666,  667,  668,  669,&lt;br /&gt;
              670,  671,  672,  673,  674,  675,  676,  677,  678,  679,&lt;br /&gt;
              680,  681,  682,  683,  684,  685,  686,  687,  688,  689,&lt;br /&gt;
             # Random scroll appearances begin here&lt;br /&gt;
              690,  691,  692,  693,  694,  695,  696,  697,  698,  699,&lt;br /&gt;
              700,  701,  702,  703,  704,  705,  706,  707,  708,  709,&lt;br /&gt;
              710,  711,  712,  713,  714,&lt;br /&gt;
             # New random scroll appearances. Repeat the first 16 above&lt;br /&gt;
              690,  691,  692,  693,  694,  695,  696,  697,  698,  699,&lt;br /&gt;
              700,  701,  702,  703,  704,  705,&lt;br /&gt;
             # Random scroll appearances end here&lt;br /&gt;
              715,  716,  717,  718,  719,&lt;br /&gt;
              720,  721,  722,  723,  724,  725,  726,  727,  728,  729,&lt;br /&gt;
              730,  731,  732,  733,  734,  735,  736,  737,  738,  739,&lt;br /&gt;
              740,  741,  742,  743,  744,  745,  746,  747,  748,  749,&lt;br /&gt;
              750,  751,  752,  753,  754,  755,  756,  757,&lt;br /&gt;
               -1, # Novel&lt;br /&gt;
              758,  759,&lt;br /&gt;
              760,  761,  762,  763,  764,  765,  766,  767,  768,  769,&lt;br /&gt;
              770,  771,  772,  773,  774,  775,  776,  777,  778,  779,&lt;br /&gt;
              780,  781,  782,  783,  784,  785,  786,  787,  788,  789,&lt;br /&gt;
              790,  791,  792,  793,  794,  795,  796,  797,  798,  799,&lt;br /&gt;
              800,  801,  802,  803,  804,  805,  806,  807,  808,  809,&lt;br /&gt;
              810,  811,  812,  813,  814,  815,  816,  817,  818,  819,&lt;br /&gt;
              820,  821,  822,  823,  824,  825,  826,  827,  828,&lt;br /&gt;
 &lt;br /&gt;
             # Dungeon features, missiles, explosions, etc.&lt;br /&gt;
              829,&lt;br /&gt;
              830,  831,  832,  833,  834,  835,  836,  837,  838,  839,&lt;br /&gt;
              840,  841,  842,  843,  844,  845,  846,  847,  848,&lt;br /&gt;
               -2, # darkened part of a room&lt;br /&gt;
              849,&lt;br /&gt;
              850,  851,  852,  853,  854,  855,  856,  857,  858,  859,&lt;br /&gt;
              860,  861,  862,  863,  864,  865,  866,  867,  868,  869,&lt;br /&gt;
              870,  871,  872,  873,  874,  875,  876,  877,  878,  879,&lt;br /&gt;
              880,  881,  882,  883,  884,  885,  886,  887,  888,  889,&lt;br /&gt;
              890,  891,&lt;br /&gt;
               -1, # vibrating square&lt;br /&gt;
              892,  893,  894,  895,  896,  897,  898,  899,&lt;br /&gt;
              900,  901,  902,  903,&lt;br /&gt;
               -1, # poison cloud&lt;br /&gt;
               -1, # valid position&lt;br /&gt;
              904,  905,  906,  907,  908,  909,&lt;br /&gt;
              910,  911,  912,  913,  914,  915,  916,  917,  918,  919,&lt;br /&gt;
              920,  921,  922,  923,  924,  925,  926,  927,  928,  929,&lt;br /&gt;
              930,  931,  932,  933,  934,  935,  936,  937,  938,  939,&lt;br /&gt;
              940,  941,  942,  943,  944,  945,  946,  947,  948,  949,&lt;br /&gt;
              950,  951,  952,  953,  954,  955,  956,  957,  958,  959,&lt;br /&gt;
              960,  961,  962,  963,  964,  965,  966,  967,  968,  969,&lt;br /&gt;
              970,  971,  972,  973,  974,  975,  976,  977,  978,  979,&lt;br /&gt;
              980,  981,  982,  983,  984,  985,  986,  987,  988,  989,&lt;br /&gt;
              990,  991,  992,  993,  994,  995,  996,  997,  998,  999,&lt;br /&gt;
             1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,&lt;br /&gt;
             1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019,&lt;br /&gt;
             1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029,&lt;br /&gt;
             1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039,&lt;br /&gt;
             1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049,&lt;br /&gt;
             1050, 1051, 1052, 1053, 1054, 1055, 1056&lt;br /&gt;
             # then repeat the monster glyphs to make statues&lt;br /&gt;
         ]&lt;br /&gt;
 &lt;br /&gt;
         # Map monsters, objects and dungeon features&lt;br /&gt;
         map_size = len(tile_map)&lt;br /&gt;
         new_tiles = [ None ] * (map_size + 394)&lt;br /&gt;
         for i in xrange(0, map_size):&lt;br /&gt;
             m = tile_map[i]&lt;br /&gt;
             if m &amp;gt;= 0:&lt;br /&gt;
                 new_tiles[i] = self.tiles[m]&lt;br /&gt;
             elif m == -2:&lt;br /&gt;
                 new_tiles[i] = self.darkenedTile(self.tiles[m - 1])&lt;br /&gt;
             else:&lt;br /&gt;
                 new_tiles[i] = self.placeHolderTile()&lt;br /&gt;
 &lt;br /&gt;
         # Generate statue tiles&lt;br /&gt;
         if no_statues:&lt;br /&gt;
             for i in xrange(0, 394):&lt;br /&gt;
                 new_tiles[i + map_size] = self.tiles[824] # statue&lt;br /&gt;
         else:&lt;br /&gt;
             for i in xrange(0, 394):&lt;br /&gt;
                 new_tiles[i + map_size] = self.makeStatue(&lt;br /&gt;
                         new_tiles[i], self.tiles[848])&lt;br /&gt;
 &lt;br /&gt;
         # Update the number of tile rows&lt;br /&gt;
         self.tile_rows = (len(new_tiles) + self.tiles_per_row - 1) \&lt;br /&gt;
                 / self.tiles_per_row&lt;br /&gt;
 &lt;br /&gt;
         # Add some blank tiles to fill out the last row&lt;br /&gt;
         num_tiles = self.tile_rows * self.tiles_per_row&lt;br /&gt;
         if len(new_tiles) &amp;lt; num_tiles:&lt;br /&gt;
             blank_tile = self.blankTile()&lt;br /&gt;
             while len(new_tiles) &amp;lt; num_tiles:&lt;br /&gt;
                 new_tiles.append(blank_tile)&lt;br /&gt;
         self.tiles = new_tiles&lt;br /&gt;
 &lt;br /&gt;
     # Rejoin the tiles into a new image&lt;br /&gt;
     def join(self):&lt;br /&gt;
         # New image dimensions; normally width will be unchanged&lt;br /&gt;
         self.width = self.tiles_per_row * self.tile_width&lt;br /&gt;
         self.height = self.tile_rows * self.tile_height&lt;br /&gt;
 &lt;br /&gt;
         # Create blank image&lt;br /&gt;
         self.image = [ None ] * self.height&lt;br /&gt;
         for i in xrange(0, self.height):&lt;br /&gt;
             self.image[i] = []&lt;br /&gt;
 &lt;br /&gt;
         # Add each tile to the end of its row&lt;br /&gt;
         for i in xrange(0, len(self.tiles)):&lt;br /&gt;
             t_row = i / self.tiles_per_row&lt;br /&gt;
             t_y = t_row * self.tile_height&lt;br /&gt;
             tile = self.tiles[i]&lt;br /&gt;
             for j in xrange(0, self.tile_height):&lt;br /&gt;
                 self.image[t_y + j].extend(tile[j])&lt;br /&gt;
 &lt;br /&gt;
     # Write the image to the output file&lt;br /&gt;
     def write(self, outname):&lt;br /&gt;
         fp = open(outname, &amp;quot;wb&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
         # Write a palettized image if possible without degradation&lt;br /&gt;
         self.buildPalette()&lt;br /&gt;
         palette_map = {}&lt;br /&gt;
         if self.bits_per_pixel &amp;lt;= 8:&lt;br /&gt;
             for i in xrange(0, len(self.palette)):&lt;br /&gt;
                 palette_map[self.palette[i]] = i&lt;br /&gt;
 &lt;br /&gt;
         # Write the header, with placeholders for some fields&lt;br /&gt;
         self.writeHeader(fp)&lt;br /&gt;
 &lt;br /&gt;
         # Write the palette if any&lt;br /&gt;
         if self.bits_per_pixel &amp;lt;= 8:&lt;br /&gt;
             for i in xrange(0, self.num_colors):&lt;br /&gt;
                 fp.write(struct.pack(&amp;quot;&amp;lt;4B&amp;quot;,&lt;br /&gt;
                         self.palette[i][0],&lt;br /&gt;
                         self.palette[i][1],&lt;br /&gt;
                         self.palette[i][2],&lt;br /&gt;
                         0))&lt;br /&gt;
         self.image_offset = fp.tell()&lt;br /&gt;
 &lt;br /&gt;
         # Write the pixels&lt;br /&gt;
         row_size = ((self.bits_per_pixel * self.width + 31) / 32) * 4&lt;br /&gt;
         if self.bits_per_pixel &amp;lt;= 8:&lt;br /&gt;
             for y in xrange(0, self.height):&lt;br /&gt;
                 row = self.image[self.height - 1 - y]&lt;br /&gt;
                 bits = 0&lt;br /&gt;
                 byte = 0&lt;br /&gt;
                 count = 0&lt;br /&gt;
                 for x in xrange(0, self.width):&lt;br /&gt;
                     index = palette_map[row[x]]&lt;br /&gt;
                     byte = (byte &amp;lt;&amp;lt; self.bits_per_pixel) | index&lt;br /&gt;
                     bits += self.bits_per_pixel&lt;br /&gt;
                     if bits &amp;gt;= 8:&lt;br /&gt;
                         fp.write(struct.pack(&amp;quot;&amp;lt;1B&amp;quot;, byte))&lt;br /&gt;
                         byte = 0&lt;br /&gt;
                         bits = 0&lt;br /&gt;
                         count += 1&lt;br /&gt;
                 if bits != 0:&lt;br /&gt;
                     byte &amp;lt;&amp;lt;= 8 - bits&lt;br /&gt;
                     fp.write(struct.pack(&amp;quot;&amp;lt;1B&amp;quot;, byte))&lt;br /&gt;
                     count += 1&lt;br /&gt;
                 while count &amp;lt; row_size:&lt;br /&gt;
                     fp.write(struct.pack(&amp;quot;&amp;lt;1B&amp;quot;, 0))&lt;br /&gt;
                     count += 1&lt;br /&gt;
         else:&lt;br /&gt;
             for y in xrange(0, self.height):&lt;br /&gt;
                 row = self.image[self.height - 1 - y]&lt;br /&gt;
                 for x in xrange(0, self.width):&lt;br /&gt;
                     for byte in row[x]:&lt;br /&gt;
                         fp.write(struct.pack(&amp;quot;&amp;lt;1B&amp;quot;, byte))&lt;br /&gt;
                 count = len(row) * len(row[0])&lt;br /&gt;
                 while count &amp;lt; row_size:&lt;br /&gt;
                     fp.write(struct.pack(&amp;quot;&amp;lt;1B&amp;quot;, 0))&lt;br /&gt;
                     count += 1&lt;br /&gt;
 &lt;br /&gt;
         # Write the header with the correct offsets&lt;br /&gt;
         self.bmp_size = fp.tell()&lt;br /&gt;
         fp.seek(0)&lt;br /&gt;
         self.writeHeader(fp)&lt;br /&gt;
 &lt;br /&gt;
     # Given the existing image, build a palette if possible&lt;br /&gt;
     # If there are more than 256 unique colors, build no palette; we will&lt;br /&gt;
     # write a 24 bit bitmap&lt;br /&gt;
     def buildPalette(self):&lt;br /&gt;
         # Collect all colors present in the image&lt;br /&gt;
         color_count = {}&lt;br /&gt;
         for row in self.image:&lt;br /&gt;
             for pixel in row:&lt;br /&gt;
                 if pixel not in color_count:&lt;br /&gt;
                     color_count[pixel] = 0&lt;br /&gt;
                 color_count[pixel] += 1&lt;br /&gt;
 &lt;br /&gt;
         # Get the list of unique colors; this will be the palette&lt;br /&gt;
         palette = color_count.keys()&lt;br /&gt;
         self.num_colors = len(palette)&lt;br /&gt;
         if self.num_colors &amp;gt; 256:&lt;br /&gt;
             # We will write a 24 bit bitmap&lt;br /&gt;
             self.bits_per_pixel = 24&lt;br /&gt;
             self.palette = None&lt;br /&gt;
             return&lt;br /&gt;
 &lt;br /&gt;
         # Arrange in descending order of occurrence&lt;br /&gt;
         palette.sort(lambda a, b : color_count[b] - color_count[a])&lt;br /&gt;
 &lt;br /&gt;
         # Set a valid bit-per-pixel count, with the fewest bits that will&lt;br /&gt;
         # encompass the palette&lt;br /&gt;
         self.palette = palette&lt;br /&gt;
         if self.num_colors &amp;lt; 2:&lt;br /&gt;
             self.bits_per_pixel = 1&lt;br /&gt;
         elif self.num_colors &amp;lt; 4:&lt;br /&gt;
             self.bits_per_pixel = 2&lt;br /&gt;
         elif self.num_colors &amp;lt; 16:&lt;br /&gt;
             self.bits_per_pixel = 4&lt;br /&gt;
         else:&lt;br /&gt;
             self.bits_per_pixel = 8&lt;br /&gt;
 &lt;br /&gt;
     # A black tile, to fill the last row&lt;br /&gt;
     def blankTile(self):&lt;br /&gt;
         return [ [ (0, 0, 0) ] * self.tile_width ] * self.tile_height&lt;br /&gt;
 &lt;br /&gt;
     # A placeholder tile, for the tiles that cannot otherwise be derived&lt;br /&gt;
     # This will appear as a red block with a black X through it&lt;br /&gt;
     def placeHolderTile(self):&lt;br /&gt;
         red   = ( 0x00, 0x00, 0xFF )&lt;br /&gt;
         black = ( 0x00, 0x00, 0x00 )&lt;br /&gt;
         tile = [ None ] * self.tile_height&lt;br /&gt;
         for y in xrange(0, self.tile_height):&lt;br /&gt;
             tile[y] = [ red ] * self.tile_width&lt;br /&gt;
         m = min(self.tile_width, self.tile_height)&lt;br /&gt;
         for x in xrange(0, m):&lt;br /&gt;
             tile[x][x] = black&lt;br /&gt;
             tile[x][m - 1 - x] = black&lt;br /&gt;
         return tile&lt;br /&gt;
 &lt;br /&gt;
     # A tile at half brightness to the input&lt;br /&gt;
     def darkenedTile(self, inptile):&lt;br /&gt;
         outtile = [ None ] * len(inptile)&lt;br /&gt;
         for y in xrange(0, len(outtile)):&lt;br /&gt;
             inprow = inptile[y]&lt;br /&gt;
             outrow = [ None ] * len(inprow)&lt;br /&gt;
             outtile[y] = outrow&lt;br /&gt;
             for x in xrange(0, len(inprow)):&lt;br /&gt;
                 inp = inprow[x]&lt;br /&gt;
                 out = ( inp[0] &amp;gt;&amp;gt; 1, inp[1] &amp;gt;&amp;gt; 1, inp[2] &amp;gt;&amp;gt; 1 )&lt;br /&gt;
                 outrow[x] = out&lt;br /&gt;
         return outtile&lt;br /&gt;
 &lt;br /&gt;
     # A statue tile.&lt;br /&gt;
     # To assist in transforming tile sets that do not use a black background,&lt;br /&gt;
     # this accepts the floor tile. A pixel that is different from the floor&lt;br /&gt;
     # tile is considered to be foreground, and converted to grayscale.&lt;br /&gt;
     def makeStatue(self, inptile, floor):&lt;br /&gt;
         outtile = [ None ] * len(inptile)&lt;br /&gt;
         for y in xrange(0, len(outtile)):&lt;br /&gt;
             inprow = inptile[y]&lt;br /&gt;
             floor_row = floor[y]&lt;br /&gt;
             outrow = [ None ] * len(inprow)&lt;br /&gt;
             outtile[y] = outrow&lt;br /&gt;
             for x in xrange(0, len(inprow)):&lt;br /&gt;
                 inp = inprow[x]&lt;br /&gt;
                 fl = floor_row[x]&lt;br /&gt;
                 if inp == fl:&lt;br /&gt;
                     # background&lt;br /&gt;
                     out = inp&lt;br /&gt;
                 else:&lt;br /&gt;
                     # foreground&lt;br /&gt;
                     gray = (inp[0] + inp[1] + inp[2]) / 3&lt;br /&gt;
                     out = ( gray, gray, gray )&lt;br /&gt;
                 outrow[x] = out&lt;br /&gt;
         return outtile&lt;br /&gt;
 &lt;br /&gt;
     # Write a BITMAPINFOHEADER-type header for a BMP file&lt;br /&gt;
     def writeHeader(self, fp):&lt;br /&gt;
         fp.write(struct.pack(&amp;quot;&amp;lt;2s6L2H6L&amp;quot;,&lt;br /&gt;
                 &amp;quot;BM&amp;quot;,&lt;br /&gt;
                 self.bmp_size,&lt;br /&gt;
                 0,&lt;br /&gt;
                 self.image_offset,&lt;br /&gt;
                 self.header_size,&lt;br /&gt;
                 self.width,&lt;br /&gt;
                 self.height,&lt;br /&gt;
                 self.num_planes,&lt;br /&gt;
                 self.bits_per_pixel,&lt;br /&gt;
                 self.compression,&lt;br /&gt;
                 self.image_size,&lt;br /&gt;
                 self.horiz_res,&lt;br /&gt;
                 self.vert_res,&lt;br /&gt;
                 self.num_colors,&lt;br /&gt;
                 self.num_important_colors))&lt;br /&gt;
 &lt;br /&gt;
 # Convert one bitmap file&lt;br /&gt;
 # inpname is the name of the file to be converted; args contains the arguments&lt;br /&gt;
 # as parsed by the ArgumentParser object&lt;br /&gt;
 def convertBitmap(inpname, args):&lt;br /&gt;
     # Collect arguments from args&lt;br /&gt;
     tile_width = args.tile_width&lt;br /&gt;
     tile_height = args.tile_height&lt;br /&gt;
     no_statues = args.no_statues&lt;br /&gt;
     outname = args.output&lt;br /&gt;
 &lt;br /&gt;
     # Provide default output file name&lt;br /&gt;
     if outname is None:&lt;br /&gt;
         d, n = os.path.split(inpname)&lt;br /&gt;
         dot = n.rfind('.')&lt;br /&gt;
         if dot != -1:&lt;br /&gt;
             n = n[:dot]&lt;br /&gt;
         n += '-360.bmp'&lt;br /&gt;
         outname = os.path.join(d, n)&lt;br /&gt;
 &lt;br /&gt;
     # Read the bitmap image&lt;br /&gt;
     bmp = Bitmap(inpname)&lt;br /&gt;
 &lt;br /&gt;
     # Provide default tile dimensions&lt;br /&gt;
     if tile_width is None:&lt;br /&gt;
         tile_width = bmp.width / 40&lt;br /&gt;
     if tile_height is None:&lt;br /&gt;
         tile_height = tile_width&lt;br /&gt;
 &lt;br /&gt;
     # Split the bitmap into tiles&lt;br /&gt;
     bmp.split(tile_width, tile_height)&lt;br /&gt;
 &lt;br /&gt;
     # Remap into 3.6.0 arrangement&lt;br /&gt;
     bmp.remap(no_statues)&lt;br /&gt;
 &lt;br /&gt;
     # Rejoin into a single image&lt;br /&gt;
     bmp.join()&lt;br /&gt;
 &lt;br /&gt;
     # Write to disk&lt;br /&gt;
     bmp.write(outname)&lt;br /&gt;
 &lt;br /&gt;
 # Define command line arguments for this program&lt;br /&gt;
 parser = argparse.ArgumentParser(&lt;br /&gt;
             formatter_class=argparse.RawDescriptionHelpFormatter,&lt;br /&gt;
             description='Convert NetHack 3.4.3 tile sets for use with 3.6.0',&lt;br /&gt;
             epilog='''&lt;br /&gt;
 If --tile-width is not specified, it is the image width divided by 40.&lt;br /&gt;
 If --tile-height is not specified, it is equal to the tile width.&lt;br /&gt;
 If --no-statues is specified, statue glyphs are copied from the 3.4.3 statue&lt;br /&gt;
    glyph; if not, statue glyphs are generated by converting the monster glyphs&lt;br /&gt;
    to grayscale.&lt;br /&gt;
 &lt;br /&gt;
 Images must be in BMP format.&lt;br /&gt;
 &lt;br /&gt;
 If --output is not specified, the output file name is &amp;lt;input-name&amp;gt;-360.bmp.&lt;br /&gt;
 Multiple images can be converted, but only if --output is not specified.&lt;br /&gt;
 ''')&lt;br /&gt;
 parser.add_argument('images', metavar='image', type=str, nargs='+',&lt;br /&gt;
             help='Name of a tile set image for NetHack 3.4.3')&lt;br /&gt;
 parser.add_argument('--tile-width', '-x', dest='tile_width', type=int,&lt;br /&gt;
             help='Width of a single tile in pixels')&lt;br /&gt;
 parser.add_argument('--tile-height', '-y', dest='tile_height', type=int,&lt;br /&gt;
             help='Height of a single tile in pixels')&lt;br /&gt;
 parser.add_argument('--no-statues', '-s', dest='no_statues',&lt;br /&gt;
             action='store_true',&lt;br /&gt;
             help='Do not derive statues from monsters')&lt;br /&gt;
 parser.add_argument('--output', '-o', dest='output', type=str,&lt;br /&gt;
             help='Name of output image')&lt;br /&gt;
 &lt;br /&gt;
 args = parser.parse_args()&lt;br /&gt;
 if len(args.images) &amp;gt; 1 and args.output is not None:&lt;br /&gt;
     sys.stderr.write(&amp;quot;Cannot specify --output with more than one image name\n&amp;quot;)&lt;br /&gt;
     sys.exit(1)&lt;br /&gt;
 &lt;br /&gt;
 # Process each image in turn&lt;br /&gt;
 rc = 0&lt;br /&gt;
 for image in args.images:&lt;br /&gt;
     if not convertBitmap(image, args):&lt;br /&gt;
         rc = 1&lt;br /&gt;
 sys.exit(rc)&lt;/div&gt;</summary>
		<author><name>Ray Chason</name></author>
		
	</entry>
</feed>