
h2. Description
The format specification ([JP2^15444-1annexi.pdf]) defines two sets of header fields for storing an image's grid resolution: 'capture resolution' and 'default display resolution'. However, the description of the 'default display' fields is vague and open to multiple interpretations, whereas the definition of 'capture resolution' is partially incomplete. This has lead to the situation that the software of most vendors will only write to / read from the 'capture' fields, whereas some others (esp. _Kakadu_'s _kdu_compress_ and _kdu_expand_ version 6.4 and earlier) only consider the 'default display' fields.
The standards committee is currently addressing this issue through an amendement to the existing standard (see below).
h2. Risks
As these fields are handled differently by different encoders/decoders, this introduces the risk that future migrations may lead to loss of resolution information. In addition, hardcopy printouts may be printed at the wrong size, and some software products for optical character recognition may fail to process images because the underlying algorithms only work properly if accurate resolution information is available.
h2. Assessment
h3. Check if resolution box exists
|*Tool*|*Exists if expression returns _True_*|
|[Jpylyzer]| {{"boolean(/jpylyzer/properties/jp2HeaderBox/resolutionBox)"}}|
h3. Check if capture resolution box exists
|*Tool*|*Exists if expression returns _True_*||
|[Jpylyzer]| {{"boolean(/jpylyzer/properties/jp2HeaderBox/resolutionBox/captureResolutionBox)"}}|
h3. Check if display resolution box exists
|*Tool*|*Exists if expression returns _True_*||
|[Jpylyzer]| {{"boolean(/jpylyzer/properties/jp2HeaderBox/resolutionBox/displayResolutionBox)"}}|
h2. Resolution handling by popular JPEG 2000 implementations
The table below shows the default fields that are used by a number of widely-used encoder/decoder applications.
|*Encoder*|*Capture Resolution*|*Default Display Resolution*|
|Kakadu _kdu_compress_ (version 6 and before)|(x)|(/)|
|Kakadu _kdu_compress_ (version 7 and later)|(/)|(x)|
|Aware JPEG 2000 SDK |(/)|(x)|
|Luratech command line tool|(/)|(x)|
|Adobe Photoshop CS4 with Adobe JPEG2000 plugin|(/)|(x)|
|ImageMagick/GraphicsMagick|(x)|(x)|
|OpenJPEG|(x)|(x)|
*Source*: [http://www.dlib.org/dlib/may11/vanderknijff/05vanderknijff.html] with additional (unpublished) tests by same author.
h2. Recommendations
h3. General
Formulate policy ('control policy') on storage of resolution in JP2s, taking into account existing workflows (including optical character recognition and possible future migrations). Note here that currently most encoders/decoders use the 'capture' fields.
h3. Pre-ingest
Use [Jpylyzer] to establish if files conform to 'control policy'. Reject any files that do not pass this test.
h3. Existing collections
* Use [Jpylyzer] to establish if files conform to 'control policy'.
* If files fail the above test, mark this in their associated in metadata. Document the issue and the associated risks.
* Normalisation may be considered. This could be as simple as changing the 'type' field of a 'default display' box to 'capture' (or vice versa). Nevertheless, this would require careful planning and risk assessment.
h2. Additional information