Cannot write jpeg2000 with ERDAS 4.3 | GDAL 1.1
By ngarel in ERDAS ECW JPEG2000 SDK
Using gdal 1.10 and ERDAS 4.3 I'm having problems when writing JP2 files.
It fails at
oError = CNCSJP2FileView::Open( &(m_OStream) );
in ecwcreatecopy.cpp.
I think the problem comes with the way ERDAS library handles m_OStream.
I commented this block just before trying to open the output file:
// if( bIsJPEG2000 )
// {
// int bSeekable = !
// ( strncmp(pszFilename, "/vsistdout/", strlen("/vsistdout/")) == 0 ||
// strncmp(pszFilename, "/vsizip/", strlen("/vsizip/")) == 0 ||
// strncmp(pszFilename, "/vsigzip/", strlen("/vsigzip/")) == 0 );
// fpVSIL = VSIFOpenL( pszFilename, (bSeekable) ? "wb+": "wb" );
// if( fpVSIL == NULL )
// {
// CPLError( CE_Failure, CPLE_OpenFailed,
// "Failed to open %s.", pszFilename );
// return CE_Failure;
// }
// m_OStream.Access( fpVSIL, TRUE, bSeekable, pszFilename, 0, -1 );
// }
which makes it fall in
oError = Open( (char *) pszFilename, false, true );
instead and works perfectly.
What is the benefit of using m_OStream? and could you confirm that the same problem occurs with you?
Hopefully ERDAS 5.0 will fix this issue
----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS ECW JPEG2000 SDK.
To unsubscribe: