<div dir="ltr">Hello,<div><br></div><div>I'm posting this here instead of Github as I don't know if it is a bug or my misuse of the VRT format in conjunction with gdal_translate.</div><div><br></div><div>When I create a VRT (v.vrt) with a SimpleSource pointing to a simple 20x20 pixels TIFF file and I do:</div><div><font face="monospace">gdal_translate v.vrt t.tif</font></div><div>I get a black image at t.tif.</div><div><br></div><div>I also get the same result if I do:</div><div><font face="monospace">gdal_translate -srcwin 0 0 20 20 v.vrt t.tif</font></div><div><br></div><div>If I change xsize or ysize to something different from 20, e.g.:</div><div><font face="monospace">gdal_translate -srcwin 0 0 21 20 v.vrt t.tif</font></div><div>then I get an image with the expected content.</div><div><br></div><div>Here's a simple VRT that can reproduce the issue:</div><div><font face="monospace"><VRTDataset rasterXSize="20" rasterYSize="20"><br>  <VRTRasterBand dataType="Byte" band="1"><br>    <SimpleSource><br>      <SourceFilename relativeToVRT="0">/vsicurl/<a href="https://raw.githubusercontent.com/osgeo/gdal/master/autotest/gcore/data/byte.tif">https://raw.githubusercontent.com/osgeo/gdal/master/autotest/gcore/data/byte.tif</a></SourceFilename><br>    </SimpleSource><br>  </VRTRasterBand><br></VRTDataset></font><br></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Am I doing something wrong here, or is there an explanation as to why my TIFF is black when the srcwin is the same size as the dataset, but OK when the srcwin is larger or smaller than the dataset?</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks,</font></div><div><font face="arial, sans-serif">Guillaume Lostis</font></div></div>