Feature request #1357

[PATCH] Build overview for Jpeg-in-TIFF file only if GDAL uses libtiff >= 4.0

Added by Paolo Cavallini about 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:ersts -
Category:Rasters
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:11417

Description

Pyramids cause tiff files to become reddish, and the lower right quadrant is not completed

Pyramid.jpg (175 KB) Paolo Cavallini, 2008-10-19 08:58 AM

ticket1357_detect_libtiff4.patch Magnifier (1.33 KB) Even Rouault, 2009-05-17 07:35 AM

History

#1 Updated by ersts - about 16 years ago

  • Status changed from Open to In Progress

Could you provide a little more background?
1) pyramids were built internal or external?
2) which resampling method?
3) is the tif paletted?
4) what OS and version of GDAL are you using?

thanks

#2 Updated by Paolo Cavallini about 16 years ago

1) External pyramids seem ok. Internal cause a crash, and the resulting tiff is reddish with the missing tile
2) average
3) GDT_Byte - Eight bit unsigned integer Image Structure Metadata:
COMPRESSION=JPEG
INTERLEAVE=PIXEL
4) tested with Debian Lenny, both on 32 and 64 bit, plus 64 bit Fedora; GDAL 1.5.2-3

#3 Updated by ersts - about 16 years ago

I was able to reproduce. It seems to be size dependent. Pyramids built ok on an 80x80 image but crashed on 8000x8000.

When it crashes I get

--> tif_jpeg.c:691: JPEGPreDecode: Assertion @sp->cinfo.comm.is_decompressor' failed.

So it is a GDAL problem. Will have to look through their tickets to see if this is a known problem.

#4 Updated by Paolo Cavallini about 16 years ago

Strange however: apparently GDAL does not crash on the same task when called from the command line

#5 Updated by ersts - about 16 years ago

I can reproduce the crash from the command line as well.

looks like it is a know problem, that has been closed but not really fixed
http://trac.osgeo.org/gdal/ticket/2033

May have to consider not allowing pyramids to be build for JPEG compressed tifs.

#6 Updated by ersts - about 16 years ago

  • Status changed from In Progress to Closed
  • Resolution set to fixed

-internal pyramid building with compress rasters, specifically JPEG compress is no longer enabled.

This can be re evaluated after libtiff 4+ comes out.

#7 Updated by Even Rouault over 15 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Ticket #2033 was closed because the fix for it went to libtiff 4.0 branch, but libtiff < 4.0 has still the issue.

So I'm attaching a patch that enables to build safely overviews on Jpeg files or Jpeg-in-TIFF file by checking that GDAL uses libtiff >= 4.0. The "official" trick to do that is searching 'BIGTIFF' in the creation options of the GTiff driver.

#8 Updated by ersts - over 15 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

The patch has been applied, 1c15572f (SVN r11188).

Thanks rouault.

Also available in: Atom PDF