Opened 21 years ago
Last modified 15 years ago
#403 closed defect
DumpModeDecode: Not enough data for scanline 0 — at Version 8
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | Jeff McKenna, hobu, Mateusz Łoskot |
Description (last modified by )
when translating a greyscale tiff I get the message: <verbatim> gdal_translate -of png cowley.tif test.png Input file size is 10060, 14800 ERROR 1: cowley.tif:DumpModeDecode: Not enough data for scanline 0 ERROR 1: TIFFReadEncodedTile() failed. ERROR 1: IReadBlock failed at X offset 0, Y offset 115 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 115 ERROR 1: cowley.tif:DumpModeDecode: Not enough data for scanline 0 ERROR 1: TIFFReadEncodedTile() failed. ... </verbatim> The output format does not seem to matter. The output image is created but the bottom strip is streaked. I can send a screen shot if you wish. The source image does not have the streaks. I'm using OpenEV for viewing. <verbatim> > gdalinfo cowley.tif # <-- input image Driver: GTiff/GeoTIFF Size is 10060, 14800 Coordinate System is `' Origin = (503830.589326,6711515.646365) Pixel Size = (0.489962,-0.489962) Corner Coordinates: Upper Left ( 503830.589, 6711515.646) Lower Left ( 505305.912, 6704264.204) Upper Right ( 508759.611, 6712518.467) Lower Right ( 510234.933, 6705267.024) Center ( 507032.761, 6708391.335) Band 1 Block=128x128 Type=Byte, ColorInterp=Palette Overviews: 106x155 Color Table (RGB with 256 entries) 0: 0,0,0,255 1: 1,1,1,255 ...blah blah blah... >gdalinfo test.jp2 # <-- output image Driver: JP2KAK/JPEG-2000 (based on Kakadu) Size is 10060, 14800 Coordinate System is `' Origin = (503830.589326,6711515.646365) Pixel Size = (0.489962,-0.489962) Corner Coordinates: Upper Left ( 503830.589, 6711515.646) Lower Left ( 505305.912, 6704264.204) Upper Right ( 508759.611, 6712518.467) Lower Right ( 510234.933, 6705267.024) Center ( 507032.761, 6708391.335) Band 1 Block=512x128 Type=Byte, ColorInterp=Palette Overviews: 5030x7400, 2515x3700, 1258x1850, 629x925, 315x463 Color Table (RGB with 256 entries) 0: 0,0,0,255 1: 1,1,1,255 2: 2,2,2,255 ...blah blah blah... </verbatim> All programs are from openev_fw_162.zip OS is WindowsXP (not avail. in the bug form)
Change History (8)
comment:3 by , 18 years ago
$ gdaladdo -r nearest etopo2-bathy.tif 2 4 8 ERROR 1: etopo2-bathy.tif:DumpModeDecode: Not enough data for scanline 0 ERROR 1: TIFFReadEncodedTile() failed. ERROR 1: etopo2-bathy.tif:DumpModeDecode: Not enough data for scanline 128 ERROR 1: TIFFReadEncodedTile() failed. ERROR 1: etopo2-bathy.tif:DumpModeDecode: Not enough data for scanline 256 $ gdalinfo etopo2-bathy.tif Driver: GTiff/GeoTIFF Size is 10800, 5400 Coordinate System is `' Origin = (-180.000000,90.000000) Pixel Size = (0.03333333,-0.03333333) Metadata: TIFFTAG_XRESOLUTION=1200 TIFFTAG_YRESOLUTION=1200 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Corner Coordinates: Upper Left (-180.0000000, 90.0000000) Lower Left (-180.0000000, -90.0000000) Upper Right ( 180.0000000, 90.0000000) Lower Right ( 180.0000000, -90.0000000) Center ( 0.0000000, 0.0000000) Band 1 Block=10800x1 Type=Byte, ColorInterp=Red Band 2 Block=10800x1 Type=Byte, ColorInterp=Green Band 3 Block=10800x1 Type=Byte, ColorInterp=Blue
comment:4 by , 18 years ago
Matt / Jeff, I would really need to examine the input files to have any idea what is going on. I *suspect* the files have null tiles or strips. I think I made a correction in GDAL to support these null tiles/strips properly but I'm not sure. Note, gdal_merge used to (and may still) produce null tiles or strips for areas with no data.
comment:6 by , 17 years ago
Priority: | high → normal |
---|
I still get this error with a current gdal_translate, and some new symptoms (which may or not have been present 3 years ago):
- if the output format is gtiff, the output file does not get written.
- if output is png, out file is written and can be viewed with OpenEV,
but xnview reports "error reading test.png"
- a further translate of the output png fails with a different message:
gdal_translate scanline0.png test.tif Input file size is 10060, 14800 0...10...20...30...40...50...60...70...80...90...ERROR 1: libpng: Not enough image data ERROR 1: IReadBlock failed at X offset 0, Y offset 14717 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 14717
The source image is 150mb. Output png is 128mb. I can make them freely available to anyone who wants to look at this more deeply. The attached image was generated via:
gdal_translate -of png cowley.tif scanline0.png gdal_translate -of png -outsize 10% 10% scanline0.png scanline0_small.png
by , 17 years ago
Attachment: | scanline0.png added |
---|
4% of original size, viewable in openev only, can't be translated to gtiff
comment:7 by , 17 years ago
curiously, the image itself can't be viewed in xnview or windows explorer, but in Thumbnail Mode, the image *is* shown, although there a strip at the bottom missing.
comment:8 by , 17 years ago
Description: | modified (diff) |
---|
I have run into this with other TIFF files, and it turns out they actually write out the last strip incomplete. So the "not enough data" message is accurate.
I can't really think of a good fix for this in GDAL. In theory libtiff could be modified to allow this, but I'm not sure that is a good idea.
It would be helpful if someone could offer a small sample file for experimenting with.