Problem with anaconda installation and jpeg version

141 views
Skip to first unread message

Florian Zinggeler

unread,
Mar 23, 2016, 6:29:37 PM3/23/16
to RSGISLib Support

Hi rsgislib users and devs,

I'm trying to use the imageregistartion module of rsgislib, but when I try to process any file that is jpeg compressed, I get the fallowing error:

  Started ..0.ERROR 1: JPEGLib:Wrong JPEG library version: library is 62, caller expects 80
  python: tif_jpeg.c:962: JPEGSetupDecode: Assertion `sp->cinfo.comm.is_decompressor' failed.

I also get this error when I try to run gdalwarp from the console.

I installed rsgislib using anaconda, using conda install -c osgeo rsgislib

I do not get this error when I use the gdalwarp version installed on my system, so this seems to be a problem with the anaconda package.
However, both versions, the working one on my system and the one from anaconda have the same version number: GDAL 1.11.2, released 2015/02/10
I have already tried both rsgislibs for python 3.5 an 3.4, same error with both. (or rather same error with their required gdal versions)

Does anyone know how I can solve this? I'm lost...
Thanks!

Daniel Clewley

unread,
Mar 24, 2016, 3:23:07 AM3/24/16
to Florian Zinggeler, RSGISLib Support
Hi Florian,

I was unclear from your message are you working JPEG files or other formats (e.g., GTiff) using JPEG compression?

If so it looks like a problem with our build of GDAL. I could reproduce using Linux (Ubuntu 12.04) using Python 3.5 with the following command:

gdal_translate -of GTiff -co COMPRESS=JPEG LS5TM_19960718_lat10lon652_r67p233_rad_srefdem.kea LS5TM_19960718_lat10lon652_r67p233_rad_srefdem.tif

I’ve not seen this before as I don’t use Geotiffs with JPEG compression.

All our conda recipes are hosted on https://bitbucket.org/danclewley/conda-recipes and I’ve opened an issue about this (https://bitbucket.org/danclewley/conda-recipes/issues/1/library-conflict-when-creating-jpeg). However, as the error only occurs in a very specific use case (which we haven’t come across before) I doubt we will look into it any time soon. If you want to have a look your self and submit a pull request you are welcome to. You might prefer to submit a pull request against the ‘official’ GDAL build though - I’m not sure where this is at the moment, there is some discussion about this here: https://github.com/conda/conda-recipes/issues/567

In the meantime a simple workaround would be to convert the files using the system version of GDAL before using in RSGISLib.

Thanks,

Dan 

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Florian Zinggeler

unread,
Mar 24, 2016, 6:09:43 AM3/24/16
to RSGISLib Support, schrot...@gmail.com
Hi Dan,

Thanks for your quick response.
Sorry, I was a bit unspecific. Yes, I'm using GTiff files with jpeg compression.

The reason I'm using jpeg compression is because my source files are aerial pictures which were already jpeg compressed.
The compression artifacts are very had to notice for my purposes, so jpeg compression seemed ideal.

I'm currently avoiding jpeg compression as a workaround, as you suggested.
However, this way my files get huge and since I'm mostly working on my laptop this is a problem.

I added a bit more details and a proposal for a possible solution on bitbucket, when you have some time I'd be very glad if you could try that:

Thank you very much

Pete Bunting

unread,
Mar 24, 2016, 6:17:09 AM3/24/16
to Florian Zinggeler, RSGISLib Support
Hi Florian, 

Have you tried using the DEFLATE (zlib) compression option for TIFF? That is very effective, it is the same compression algorithm we use in KEA files - I use KEA as my file format of choice. 

Best wishes, 

Pete

Florian Zinggeler

unread,
Mar 24, 2016, 8:26:43 AM3/24/16
to RSGISLib Support, schrot...@gmail.com
Hi Pete,

Yes, I tried that, but since its a lossless compression algorithm it can't possibly provide the same level of compression as the lossy compression provided by jpeg.
By using DEFALTE=6 I get a filesize of 788mb, while the jpeg compressed tiff is just 68mb.

But maybe one of the options provided by GTiff might suit my needs:
JPEG/LZW/PACKBITS/DEFLATE/CCITTRLE/CCITTFAX3/CCITTFAX4/LZMA
I guess I'll just try them one by one, unless someone can recommend one for my scenario
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages