I&#39;m trying to use gdal2tiles to tile a not-georeferenced image (an old map).<div>The image is a 5816x3961 color jpeg.</div><div><br></div><div>Running the following command:</div><div>&gt; gdal2tiles -p raster -z &quot;0-3&quot; myimage.jpg myimage_tiles</div>
<div>I obtain 256x256 tile images but the content is wrongly rescaled.</div><div><br></div><div>I noticed that the problem happens in the code between lines 1276-127 <a href="http://trac.osgeo.org/gdal/browser/tags/1.8.1/gdal/swig/python/scripts/gdal2tiles.py#L1276">http://trac.osgeo.org/gdal/browser/tags/1.8.1/gdal/swig/python/scripts/gdal2tiles.py#L1276</a></div>
<div>where the rescaled is applied based on self.querysize, which by default is 4 times the tile size. </div><div><br></div><div>If I change those lines to: (i.e. write the data directly to dstile rather then dsquery, and commenting the call to the rescaling method)</div>
<div><br></div><div>-----------</div><div><div>dstile.WriteRaster(wx, wy, wxsize, wysize, data, band_list=list(range(1,self.dataBandsCount+1)))</div><div>dstile.WriteRaster(wx, wy, wxsize, wysize, alpha, band_list=[tilebands])</div>
<div><br></div><div>#self.scale_query_to_tile(dsquery, dstile, tilefilename)</div></div><div>------------</div><div><br></div><div>everything works perfectly, and I obtain the correct tiles.</div><div>I don&#39;t know if querysize should me managed differently, or if I&#39;m using gdal2tiles the wrong way...</div>
<div><br></div><div>giovanni</div><div><br></div><div><br></div>