Opened 17 years ago

Closed 10 years ago

#1655 closed defect (invalid)

ECW support doesn't work on OSX

Reported by: kyngchaos Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: ecw jp2ecw macosx
Cc: Mateusz Łoskot

Description

Since the betas and final release of ECW 3.3 (haven't tried earlier versions on OSX, but supposedly they have problems of their own), I have not been able to get ECW support to work on OSX. ERM won't help, since OSX 10.3-only (GCC 3.3) is officially supported. I need to build on 10.4 (GCC 4.0). I finally got something that may point to GDAL.

I found that another application for OSX that uses libecwj2 3.3 works (GraphicConverter, a shareware prog), though there are writing problems. After trying various libecw builds from GC and my own, and diff versions of libecw (final and RC2), I comfirmed that GC worked with whatever I tried, but GDAL would not. The problems:

When reading ECW images, all I get is an invalid file error - with CPL_DEBUG:

ECW: NCScbmOpenFileView(/Users/Shared/src/gdal/tests/jrc.ecw): eErr = 86 ERROR 1: File is invalid or corrupt GDALOpen failed - 1 File is invalid or corrupt

As mentioned, this works in the GraphicConverter software.

When writing an ECW image, it makes it thru the whole progress, then dies:

Input file size is 5000, 5000 0...10...20...30...40...50...60...70...80...90...100 - done. Floating point exception

All I get is the ECW magic bytes (06 02 01 02), I think, and what looks like an index table (a series of 4-byte pairs). GraphicConverter also has problems writing ECW (but no errors, just quietly fails), so this one may be a libecw bug. But writing is less critical, for me at least.

JP2ECW read and write works.

Change History (4)

comment:1 by kyngchaos, 17 years ago

I found a fix for the invalid file problem - for the ECW SDK, no changes needed for GDAL. I've summarized all OSX patches needed for the ECW SDK in the ER forum thread:

http://forums.ermapper.com/viewtopic.php?t=2446

Writing still doesn't work, but now it returns an error instead of a seg fault.

These ECW problems are probably just ECW SDK problems, not GDAL problems, after all. There are just different methods of using the SDK and the one GDAL used was broken.

comment:2 by Mateusz Łoskot, 16 years ago

Cc: Mateusz Łoskot added
Keywords: ecw jp2ecw macosx added

comment:3 by Jukka Rahkonen, 10 years ago

Ticket seems to handle so old versions of GDAL, ECW SDK and OSX that it can be closed.

comment:4 by Even Rouault, 10 years ago

Resolution: invalid
Status: newclosed

There's a new ticket with a patch from Intergraph to support SDK 5.1 on OSX

Note: See TracTickets for help on using tickets.