GDAL cannot create large jpegs
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:/
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.
affects: | launchpad → gdal (Ubuntu) |
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/StableRelea seUpdates