2

I've encountered two issues when trying to display some aerial imagery data in QGIS and haven't managed to work out what the problem is. Frustratingly the issues only affect some tiles, and there doesn't appear to be anything obviously different between tiles that display fine and tiles that don't.

The two issues are:

  1. Some tiles do not display at all in QGIS e.g. sx6346.jpg
  2. Some tiles display, but have colourful horizontal lines across them e.g. sx6345.jpg.

Note: tile sx6346 is not displayed, tile sx6345 displays extraneous colourful lines

In the screengrab above tile sx6346 is not displayed; tile sx6345 displays extraneous colourful lines. Adjacent tiles included to show that they display fine.

Regarding the extraneous colourful line issue 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.

Note: tile sx6345 is displayed fine at scale 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).

QGIS displays the following errors for the above two issues:

  1. Unsupported Data Source: C:\Data\aerial_imagery\sx\sx6346.jpg is not a supported raster data source libjpeg: Bogus Huffman table definition
  2. Warning 1: libjpeg: Corrupt JPEG data: 285 extraneous bytes before marker 0xda [note: this error doesn't appear when adding the image to QGIS, but it does if you try and create a virtual raster catalog that includes the affected images (Raster > Miscellaneous > Build Virtual Raster Catalog...)]

The same images display fine in ArcGIS, MapInfo and in a range of image applications including GIMP, Paint and Paint Shop Pro. The above 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 two error messages displayed in QGIS suggest problems with the source JPEG files, but given they work 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 two affected tiles can be downloaded from Dropbox.

Really, I'm asking if anyone has encountered anything like this before?

And do these issues sound like bugs in QGIS given the affected images work in every other package I've tried?

  • Bit more info on this problem: it looks like this is only a problem on Windows as the images load fine using QGIS on a Mac and on Linux. – Ian Holmes Aug 23 '16 at 14:21
2

This is a bug in QGIS and only affects QGIS on 64-bit Windows PC's.

Logged as a bug in the QGIS redmine channel (http://hub.qgis.org/issues/15446), which has now been closed so will hopefully make it in a to a future release of QGIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.