Opened 18 years ago

Last modified 18 years ago

#1148 closed defect (fixed)

GDAL oversampling ECW files

Reported by: asger@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

Using GDAL 1.3.1.0 from FWTools 1.0.0b2.

When oversampling ecw files the number of lines in the output seems to be 
fine but the number of pixels is 1/3 of what is should be.

Doesn't work:
band.RasterIO(Gdal.RWFlag.Read, 500, 500, 351, 351, data, 352, 352,
Gdal.DataType.Byte, 3, 1056)

Works:
band.RasterIO(Gdal.RWFlag.Read, 500, 500, 351, 351, data, 351, 351,
Gdal.DataType.Byte, 3, 1056)

Attachments (3)

out.ecw (83.3 KB ) - added by asger@… 18 years ago.
Example file on which oversampling fails
read_351_into_351.jpg (17.9 KB ) - added by asger@… 18 years ago.
Example of reading 351x351 pixels into a buffer of the same size
read_351_into_352.jpg (9.1 KB ) - added by asger@… 18 years ago.
Example of reading 351x351 pixels into a 352x352 buffer

Download all attachments as: .zip

Change History (4)

by asger@…, 18 years ago

Attachment: out.ecw added

Example file on which oversampling fails

by asger@…, 18 years ago

Attachment: read_351_into_351.jpg added

Example of reading 351x351 pixels into a buffer of the same size

by asger@…, 18 years ago

Attachment: read_351_into_352.jpg added

Example of reading 351x351 pixels into a 352x352 buffer

comment:1 by warmerdam, 18 years ago

Asger, 

I have confirmed that this was a bug in gdal/frmts/ecw/ecwdataset.cpp.
It only seems to strike when the buffer sizes differ, and non-default
packing is used.  

I have committed a fix in CVS.  It will appear in GDAL 1.3.2. 

Thanks!

Note: See TracTickets for help on using tickets.