Bug report #15446
Aerial imagery display error: libjpeg: Bogus Huffman table definition
|Affected QGIS version:||2.16.1||Regression?:||No|
|Operating System:||Windows 64bit||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23372|
I have have a national aerial imagery dataset but some of the tiles will not display in QGIS and give the following error message:
Unsupported Data Source: C:\\Data\\aerial_imagery\\sx\\sx6346.jpg is not a supported raster data source libjpeg: Bogus Huffman table definition
The above image file can be downloaded from https://www.dropbox.com/s/lqqas8rvf5gkkft/sx6346.zip?dl=0
The same image file displays fine in ArcGIS, MapInfo and in a range of image applications including GIMP, MS Paint and Paint Shop Pro.
I've tried to view this image in multiple versions of QGIS including 2.16.1 (the current latest version) and 2.14.5 (the current LTR) 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.