# JP2OpenJPEG --- JPEG2000 driver based on OpenJPEG library

(GDAL >= 1.8.0)

This driver is an implementation of a JPEG2000 reader/writer based on OpenJPEG library v2.

For GDAL 1.10 or later, use openjpeg 2.0.

For GDAL 1.9.x or before, use the v2 branch from its Subversion repository : http://openjpeg.googlecode.com/svn/branches/v2 (before r2230 when it was deleted).

The driver uses the VSI Virtual File API, so it can read JPEG2000 compressed NITF files.

Starting with GDAL 1.9.0, XMP metadata can be extracted from JPEG2000 files, and will be stored as XML raw content in the xml:XMP metadata domain.

Starting with GDAL 1.10, the driver supports writing georeferencing information as GeoJP2 and GMLJP2 boxes.

## Creation Options

- CODEC=JP2/J2K : JP2 will add JP2 boxes around the codestream data. The value is determined automatically from the file extension. If it's neither JP2 nor J2K, J2K codec is used.

- GMLJP2=YES/NO: (Starting with GDAL 1.10) Indicates whether a GML box conforming to the OGC GML in JPEG2000 specification should be included in the file. Defaults to YES.

- GeoJP2=YES/NO: (Starting with GDAL 1.10) Indicates whether a UUID/GeoTIFF box conforming to the GeoJP2 (GeoTIFF in JPEG2000) specification should be included in the file. Defaults to YES.

- QUALITY : Percentage between 0 and 100. A value of 50 means the file will be half-size in comparison to uncompressed data, 33 means 1/3, etc.. Defaults to 25

- REVERSIBLE=YES/NO : YES means lossless compression. Defaults to NO.

- RESOLUTIONS : Number of resolution levels. Between 1 and 7. Defaults to 6.

- BLOCKXSIZE : Tile width. Defaults to 1024.

- BLOCKYSIZE : Tile height. Defaults to 1024.

- PROGRESSION : Progession order : LRCP, RLCP, RPCL, PCRL or CPRL. Defaults to LRCP.

- SOP=YES/NO : YES means generate SOP marker segments. Defaults to NO.

- EPH=YES/NO : YES means generate EPH marker segments. Defaults to NO.

## See Also:

- Implemented as `gdal/frmts/openjpeg/openjpegdataset.cpp`.

- Official JPEG-2000 page

- The OpenJPEG library home page

Other JPEG2000 GDAL drivers :

- JPEG2000: based on Jasper library (open source)

- JP2ECW: based on Erdas ECW library (commercial)

- JP2MRSID: based on LizardTech MrSID library (commercial)

- JP2KAK: based on Kakadu library (commercial)