ECW File Documentation


Summary

An Enhanced Compression Wavelet image (.ecw) is a proprietary, wavelet-compressed raster format built to store very large georeferenced imagery — aerial photos, satellite scenes and scanned maps — at roughly 15:1 or higher while staying visually near-lossless. Created by Earth Resource Mapping in 1998 and now owned by Hexagon, its MIME type is image/x-ecw. Decoding an .ecw is free (IrfanView, XnView, QGIS, GDAL); creating one needs a paid Hexagon licence.

Technical details

FeatureValue
Full nameEnhanced Compression Wavelet (ECW) image
File extension.ecw
MIME typeimage/x-ecw
Format typeWavelet-compressed geospatial raster (binary)
CompressionDiscrete wavelet transform (DWT), lossy; ~15:1–20:1 and higher
DeveloperEarth Resource Mapping (ER Mapper); now Hexagon
Ownership chainER Mapper → ERDAS → Intergraph → Hexagon AB
Introduced1998 (Perth, Australia)
Current SDKERDAS ECW/JP2 SDK (Hexagon); file version v3
Open standardNo — proprietary codec
GeoreferencedYes — carries projection, datum/EPSG, cell size, origin
Multi-resolutionYes — wavelet sub-bands give fast zoom/pan and pyramids
Streaming protocolECWP (ecwp://) via Image Web Server
Header tag (v2/v3)65 57 (ASCII eW) at offset 0
LicensingFree desktop decoding; paid licence to encode/serve
Related extensions.jp2, .sid, .tif (GeoTIFF), .ers, .ecwp
Specification / drivergdal.org/en/stable/drivers/raster/ecw.html
File signature (magic bytes)
65 57 01 06

Offset 0. ECW v2/v3 files open with the ASCII tag eW (65 57) that identifies the ER Mapper ECW header, followed by version/marker bytes. Do not confuse this with the JPEG 2000 output of the same ERDAS ECW/JP2 SDK: a .jp2 instead begins with the JP2 signature box 00 00 00 0C 6A 50 20 20. If the first two bytes are eW the file is ECW; if they are the JP2 box it is JPEG 2000. The remaining header fields (dimensions, band count, projection) are private to the proprietary format.

What is an ECW file?

ECW stands for Enhanced Compression Wavelet. It is a proprietary raster image format designed in 1998 by Earth Resource Mapping (ER Mapper) in Perth, Australia, for one specific job: storing and streaming very large georeferenced imagery — aerial photography, satellite scenes and scanned map sheets. Its compression is based on the discrete wavelet transform, which routinely reaches 15:1 to 20:1 (and far more) while staying visually near-lossless, so a multi-gigabyte orthophoto shrinks to a fraction of its size and can still be panned and zoomed quickly. The MIME type is image/x-ecw. Ownership passed through a chain of acquisitions (ER Mapper → ERDAS → Intergraph → Hexagon AB), and the codec ships today as the ERDAS ECW/JP2 SDK from Hexagon.

ECW belongs to the GIS world rather than general photography because its images are georeferenced: the file carries the projection and coordinate information needed to place the pixels correctly on a map. That single property, plus the wavelet compression, is what the rest of this article unpacks.

The discrete wavelet transform: why ECW is small and zoomable

Ordinary photo formats such as JPEG compress in fixed 8×8 blocks. ECW instead applies a discrete wavelet transform (DWT) across the whole image. A wavelet transform repeatedly splits the image into a low-resolution approximation plus detail sub-bands (horizontal, vertical and diagonal high-frequency content). Applying the transform again to the low-resolution part produces a pyramid: each level is a coarser version of the picture, with the detail needed to reconstruct the next finer level stored separately.

Two consequences follow directly, and both are the reason ECW exists. First, the detail coefficients are highly compressible — most are near zero for natural imagery — so quantising and entropy-coding them yields the high ratios ECW is known for. The compression is lossy by design: the reconstructed pixels are close to, but not identical to, the originals. Second, the pyramid is a set of overview levels. To draw a zoomed-out view, a decoder reads only the coarse levels and never touches the full-resolution coefficients, so displaying a small preview of a terabyte mosaic costs a small amount of memory and I/O. Zooming in progressively decodes finer sub-bands only for the visible region.

The ECW header and the eW tag

An ECW v2/v3 file opens with a header block that begins with the ASCII tag eW (bytes 65 57) identifying the ER Mapper ECW structure. The header records the image geometry and the parameters a decoder needs before it can touch the compressed data.

ECW header (conceptually)
  tag           : 'eW'  (0x65 0x57)   ER Mapper ECW marker
  version       : format version (v2 / v3)
  width, height : image dimensions in pixels
  bands         : number of colour/spectral bands (e.g. 3 for RGB)
  cell sizes    : ground resolution per pixel (X, Y)
  DWT params    : number of wavelet levels, block/tile sizing
  georeference  : projection, datum / EPSG, origin coordinates

The exact byte layout of the header fields is not publicly published — ECW is a closed format, and the authoritative reader is Hexagon’s SDK (used under the hood by GDAL and by viewers such as IrfanView). The eW tag is the reliable identifier at offset 0; the newer v3 file version reorganises what the header carries (statistics, histograms, metadata and RPC information moved into the header), and v3 files will not decode in older v3.x/v4.x SDK builds. Treat the internal field offsets as SDK-private and rely on the eW tag plus the SDK for parsing.

ECW versus the SDK’s JPEG 2000 output

The same ERDAS ECW/JP2 SDK reads and writes two formats, and they are easy to confuse. An .ecw is the proprietary ECW format above. A .jp2 is JPEG 2000, an ISO/IEC open standard (also wavelet-based) that the SDK produces as its standards-compliant alternative. They are told apart by their first bytes: ECW starts with eW (65 57), while a JP2 starts with the JPEG 2000 signature box 00 00 00 0C 6A 50 20 20. JPEG 2000 can also carry georeferencing (the GeoJP2 convention), which is why ECW → JP2 is a natural conversion when an open, georeferenced target is wanted.

Georeferencing: pixels tied to the ground

A general image format records only a grid of pixels. ECW additionally records how that grid maps onto the Earth: the coordinate reference system (projection and datum, often as an EPSG code), the ground size of one pixel (the cell size), and the map coordinate of the image origin. With those, a GIS knows that pixel (0,0) sits at a specific easting and northing and that each pixel spans, say, 0.25 m on the ground, so the imagery lines up with vector layers, other rasters and measurements. Some workflows also keep georeferencing in a sidecar (an ER Mapper .ers header or a world file) alongside the image. This is the dividing line between ECW and an ordinary picture: convert an ECW to plain JPG and the pixels survive but the ground coordinates are gone, so the result is a picture, not a map layer.

ECWP: streaming tiles instead of whole files

ECW was built alongside a companion delivery mechanism, the ECW Protocol (ecwp://), served by Image Web Server. Because the wavelet structure lets a decoder request just the resolution and the region it needs, an ECWP server sends only the tiles visible in the current view at the current zoom, not the whole file. That is how an analyst can browse a terabyte-scale mosaic over a network at interactive speed: the client pulls coarse tiles first, then finer detail for the area on screen, mirroring the multi-resolution pyramid inside every ECW file.

The decode-free, encode-paid split

The most common practical surprise with ECW is its licensing asymmetry. Decoding an ECW — reading and viewing it on the desktop — is free of charge under Hexagon’s SDK terms, which is why free tools open ECW at all: QGIS and GDAL use the ECW driver, and IrfanView and XnView view it through the plugin. Encoding (creating new ECW files), server deployment, and unlimited mobile decoding require a purchased Hexagon licence. This is also why some open-source GDAL builds omit the ECW driver entirely: the proprietary SDK cannot always be redistributed, so a given QGIS or GDAL installation may or may not include ECW support depending on how it was compiled. When ECW “won’t open” in a GDAL-based tool, a missing ECW driver in that build is the usual cause.

Frequently asked questions

Why is an ECW so small for such a huge image?

Its discrete wavelet transform concentrates most of the image’s information into a few large coefficients and leaves the rest near zero, which compresses extremely well. Ratios of 15:1 or more are typical while the result stays visually near-lossless. The same wavelet pyramid also stores the image at multiple resolutions, so zoomed-out views decode from tiny coarse levels.

Why can’t Photoshop or Paint open my ECW?

ECW is a specialist geospatial format with a proprietary wavelet codec, not a general image format, so mainstream photo editors do not include a reader. Use a GIS-aware viewer (QGIS, or IrfanView/XnView with the ECW plugin), or convert the file to GeoTIFF or JPEG with QGIS or GDAL first.

Do I have to pay to view ECW files?

No. Hexagon’s SDK allows free desktop decoding, so IrfanView, XnView, QGIS and GDAL open ECW at no cost. A licence is required only to create (encode) ECW files, to deploy on a server, or for unlimited mobile decoding.

References