[Gdal-dev] strange problem with ECW ( performance and quality) when getting the scanlines from SizeY-1 to 0 instead of from 0 to SizeY-1

Stephane Routelous route at cae.com
Wed Oct 20 14:10:29 EDT 2004


Hi,

I faced a real strange problem with ecw.
You can reproduce it with gdal_translate modifying the code of
gdaldriver.cpp
I'm using GDAL 1.2.3.0, released 2004/08/25

First, get the testdata image from ERMapper (Greyscale.ecw)

1/ run gdal_translate.exe GreyScale.ecw output1.bmp -of BMP

2/ modify the code in gdaldriver.cpp line 333 (in the CreateCopy method)
from 	for( int iLine = 0; iLine < nYSize; iLine++ )
to	for( int iLine = nYSize-1; iLine >=0 ; iLine-- )

3/ recompile gdal

4/ run gdal_translate.exe GreyScale.ecw output2.bmp -of BMP

the second version is *a lot* slower, and the result is quite strange.

Do somebody has an idea what can be wrong ?

http://exotk.org/ecw/Greyscale.ecw
http://exotk.org/ecw/output1.bmp
http://exotk.org/ecw/output2.bmp


Thanks in advance,

Stephane Routelous






More information about the Gdal-dev mailing list