GDAL cannot create large jpegs

Bug #1752969 reported by Brian R
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdal (Ubuntu)
New
Undecided
Unassigned

Bug Description

Package gdal-bin

On Ubuntu 17.10 (Current packages as of March 2, 2018)
With gdal 2.2.1+dfsg-2build3

When converting a large NITF file (~26mb) to JPEG, I get the following error:

e.g. gdal_translate -of JPEG mylarge.nitf mylarge.jpeg
Input file size is 30464, 22528
OERROR 1: libjpeg: Backing store not supported

I did some research into this and basically it appears that libjpeg-turbo (which gdal is using to r/w JPEG's) recently starting honouring max_memory_to_use (as of 1.5.2), and lacks a backing store implementation (which is apparently some archaic way of mapping memory).

It looks like this is the appropriate fix in GDAL
https://github.com/OSGeo/gdal/commit/c515fa7eecc885ab59a3c717ad96415b9b2e7077

I believe this just needs to be incorported into the version in Ubuntu, though further discussion and/or testing would be warranted.

It's pretty easy to replicate.. just try to write any large file with gdal_translate (for reference, my 26mb JP2/NITF is roughly a 670mb bmp). You get the same problem writing any large file with gdal_translate as jpeg, it's not specific to JP2/NITF inputs.

Brian R (brianrusso)
affects: launchpad → gdal (Ubuntu)
Revision history for this message
Bas Couwenberg (sebastic) wrote :

gdal and other geospatial packages are not maintained within Ubuntu. The commit can be cherry-picked into the Debian package, but that doesn't get the fix into Ubuntu.

You will need to follow the stable release updates [0] process to get the fix into Ubuntu.

[0] https://wiki.ubuntu.com/StableReleaseUpdates

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.