<p>Hello list,I`m a newbie in TileCache and Python and I have a problem in configuring ImageLayer.</p>
<p>I have Python 2.7 (with PIL) and installed TileCache using this <a href="http://oegeo.wordpress.com/2008/03/08/the-5-minute-guide-to-setting-up-tilecache-on-windows/"><em>The 5 minute guide to setting up TileCache on Windows</em></a> and it worked fine with default configuration.</p>

<p>I want to create tiles from image on my disk,but I failed in doing it.I experimented a lot with various configuration examples I found on `net and browse through archives,but I still get pink tiles.</p>
<div>Curently,my configuration (I`m only passing things I changed) looks like this:</div>
<div><br>[fuf] <br>type=ImageLayer <br>file=/fuf/fd.jpg <br>bbox=0,0,7391,5487 <br>filebounds=0,0,7391,5487   <br>maxresolution=28.87109375           # 7391/256=28.87109375</div>
<div><br>and in index.htm:</div>
<div>  map = new OpenLayers.Map( $(&#39;map&#39;), {&#39;maxResolution&#39;: 7391/256, &#39;maxExtent&#39;: new OpenLayers.Bounds(0, 0, 7391, 5487)});<br>  layer = new OpenLayers.Layer.WMS( &quot;ImageLayer&quot;, &quot;/cgi-bin/tilecache.cgi?&quot;, {layers: &#39;fuf&#39;, format: &#39;image/png&#39;} );</div>

<div><br>I get following error message:</div>
<div>An error occurred: integer argument expected, got float<br>  File &quot;C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TileCache\Service.py&quot;, line 343, in cgiHandler<br>    format, image = service.dispatchRequest( params, path_info, req_method, host )<br>
  File &quot;C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TileCache\Service.py&quot;, line 208, in dispatchRequest<br>    return self.renderTile(tile, params.has_key(&#39;FORCE&#39;))<br>  File &quot;C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TileCache\Service.py&quot;, line 138, in renderTile<br>
    data = layer.render(tile, force=force)<br>  File &quot;C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TileCache\Layer.py&quot;, line 444, in render<br>    return self.renderTile(tile)<br>  File &quot;C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\TileCache\Layers\Image.py&quot;, line 61, in renderTile<br>
    sub = sub.resize(size, scaling)<br>  File &quot;C:\Python27\lib\site-packages\PIL\Image.py&quot;, line 1290, in resize<br>    self.load()<br>  File &quot;C:\Python27\lib\site-packages\PIL\Image.py&quot;, line 1706, in load<br>
    <a href="http://self.im">self.im</a> = self.im.crop(self.__crop)</div>
<div><br>If I change maxresolution=28.87109375 into maxresolution=28 (or maxresolution=29) in my cfg file i get following error:</div>
<p>An error occurred: can&#39;t find resolution index for 14.435547. Available resolutions are: <br>[28.0, 14.0, 7.0, 3.5, 1.75, 0.875, 0.4375, 0.21875, 0.109375, 0.0546875, 0.02734375, 0.013671875, 0.0068359375, 0.00341796875, 0.001708984375, 0.0008544921875, 0.00042724609375, 0.000213623046875, 0.0001068115234375, 5.340576171875e-05]</p>

<p>or</p>
<p>An error occurred: can&#39;t find resolution index for 14.435547. Available resolutions are: <br>[29.0, 14.5, 7.25, 3.625, 1.8125, 0.90625, 0.453125, 0.2265625, 0.11328125, 0.056640625, 0.0283203125, 0.01416015625, 0.007080078125, 0.0035400390625, 0.00177001953125, 0.000885009765625, 0.0004425048828125, 0.00022125244140625, 0.000110626220703125, 5.53131103515625e-05]</p>

<p> </p>
<p>Error messages are the same whether I use filebounds in decimal degrees (37.97,43.956,39.526,45.046) or in pixels (0,0,7391,5487).</p>
<p><br>Thanks in advance,<br>Bojan</p>