Bug report #8272

Updated by Hugo Mercier about 5 years ago

With some georeferenced rasters (for instance a jpeg file with a .jgw world file), visual artifacts may appear on some zoom levels.



Steps to reproduce :

* load the raster found in attachment (do not forget to copy the .jgw file in the same directory)

* move it to the top left corner of the canvas, with some space not visible

* extent the canvas window until you see glitches. You can find examples in attachment also.



When these visual artifacts occur, a GDAL error is displayed on the console :

Warning: RasterIO error1: /home/hme/Bureau/atlas/test.jpeg, band 2: Access window out of range in RasterIO(). Requested

(77,626) of size 3431x1854 on raster of 3507x2480.



Indeed there is an off-by-one size calculation somewhere in qgsgdalprovider.cpp



The problem is apparently due to a not very well-formatted world file : some of its constants do not exhibit enough decimals (first and fourth line for instance).



I suspect some strange rounding errors for now ...



Back