[Qgis-user] Issue " GDAL chokes opening attached JPG, yet works OK in other applications #1545 "

Patrick Dunford enzedrailmaps at gmail.com
Sun Apr 17 07:43:57 PDT 2022


Just noted on the closed issue that I saw this problem for the first 
time today. The error message returned by Qgis being

2022-04-18T01:53:51     WARNING 
D1961_94CFT_92XGM_94CFW_92XGN_f6e10828_d0fa_42e6_a318_901bef99006f :: 
/mnt/sharerw/mainpc/maps/References/Volume 11-12 - MSL/Station - 
Dunsandel/D1961:94CFT-92XGM+94CFW-92XGN.jpg, band 1: IReadBlock failed 
at X offset 0, Y offset 600: Reading this image would require libjpeg to 
allocate at least 1866240000 bytes. This is disabled since above the 
104857600 threshold. You may override this restriction by defining the 
GDAL_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompile 
GDAL by defining the GDAL_LIBJPEG_LARGEST_MEM_ALLOC macro to a value 
greater than 104857600

In this case the raster file size is only 26 MB.

The error message is spurious as the issue is found to be caused by 
using a Progressive JPEG as exported from Gimp. When the Progressive 
setting is turned off in the Gimp export settings there are no problems 
importing the raster in Qgis or displaying it.

My recollection is the issue of progressive JPEGs not being able to be 
loaded in Qgis is not a new problem and something I first found to be 
happening several years ago. I had to at that time convert all the 
progressive JPEG rasters I had into non progressive. The issue may have 
occurred because of a new release of GDAL or possibly when Qgis 3.0 was 
introduced.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220418/952d3b1b/attachment.html>


More information about the Qgis-user mailing list