Bug report #15447

Aerial imagery display issue: extraneous colourful lines displayed across image

Added by Ian Holmes over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Rasters
Affected QGIS version:2.16.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:23373

Description

I have have a national aerial imagery dataset but some of the tiles display with extraneous colourful horizontal lines across them e.g. sx6345.jpg in the attached screen grab (qgis_aerial_imagery_zoomed_in.png).

There seems to be a threshold, which is different for each image, where they display fine at scales above a certain value. For example sx6345 displays fine at scale 1:19,845 and above, but has colourful lines across it at all scales below 1:19,845. This threshold seems to be somehow linked to the size of the actual QGIS application window (if I make the QGIS window bigger, the image displays fine at all scales above 1:19,856, see attached screen grab qgis_aerial_imagery_zoomed_out.png).

QGIS displays the following error for the above image if you try and create a virtual raster catalog that includes one of the affected images (Raster > Miscellaneous > Build Virtual Raster Catalog...).

Warning 1: libjpeg: Corrupt JPEG data: 285 extraneous bytes before marker 0xda

Note: this error doesn't appear when adding the image to QGIS.

The same image displays fine in ArcGIS, MapInfo and in a range of image applications including GIMP, MS Paint and Paint Shop Pro. The attached screen grabs are from the latest version of QGIS (2.16.1) but I’ve also tested them in multiple previous versions (including the current LTR 2.14.5) and unfortunately the behaviour is the same in all versions of QGIS.

The error message displayed in QGIS suggests a problem with the source JPEG file, but given it works in every other package I've tried it appears that QGIS is being more rigorous in the code it's using to display JPEG's than everything else.

Using GDAL to do a JPEG to JPEG conversion resolves the problem but given we can't easily identify the affected files we'd have to process them all, which isn't practical given the number of files we have.

The affected image can be downloaded from https://www.dropbox.com/s/7jjprkdtw2cbh0h/sx6345.zip?dl=0

Possibly related to Issue #15446

qgis_aerial_imagery_zoomed_in.png - Note colourful lines across tile sx6345 (567 KB) Ian Holmes, 2016-08-17 08:20 AM

qgis_aerial_imagery_zoomed_out.png - Note that there are now no colourful lines across tile sx6345 at this zoom level (359 KB) Ian Holmes, 2016-08-17 08:20 AM


Related issues

Duplicated by QGIS Application - Bug report #15446: Aerial imagery display error: libjpeg: Bogus Huffman tabl... Closed 2016-08-17

History

#1 Updated by Ian Holmes over 4 years ago

Possibly related to Issues #15446 and #15460

Note, projection is British National Grid, EPSG 27700

#2 Updated by Ian Holmes over 4 years ago

Bit more info on this problem: it looks like this is only a problem on Windows as the image loads fine using QGIS on a Mac and on Linux.

#3 Updated by Jürgen Fischer over 4 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

duplicate of #15446

Also available in: Atom PDF