Skip to content

JPH output: ftyp compatibility list omits the 'jph ' brand (lists only 'jp2 ') #412

Description

@flamsens

Summary

When grok writes a High Throughput JPEG 2000 (.jph) file, the File Type box
(ftyp) sets the major brand correctly to jph but its compatibility
list
(CL) contains only jp2 — it does not include jph . Per ISO/IEC
15444-15, a conformant JPH file's compatibility list should include the jph
brand. As a result, strict validators (e.g. jpylyzer) report the file as invalid,
even though it is otherwise well-formed and decodes correctly (including by grok's
own grk_decompress).

Version

grok v20.3.5 (release tarball), built from source, amd64.

Steps to reproduce

# any input image
grk_compress -i input.png -o out.jph -n 7 -c "[256,256]" -b "64,64" \
  -p RPCL -S --tile-parts R --plt --tlm -M 64

pip install jpylyzer            # >= 2.2 (has HTJ2K/JPH support)
jpylyzer --format jph out.jph

Observed

jpylyzer reports the file invalid with a single failing test:

<isValid format="jph">False</isValid>
...
<compatibilityListIsValid>False</compatibilityListIsValid>
...
<fileTypeBox>
    <br>jph </br>      <!-- major brand: correct -->
    <minV>0</minV>
    <cL>jp2 </cL>      <!-- compatibility list: only 'jp2 ', missing 'jph ' -->
</fileTypeBox>

The .jph decodes fine via grk_decompress, so this is purely a file-format
conformance issue in the JPH ftyp writer.

Expected

The ftyp compatibility list of a .jph file should include the jph brand
(in addition to, or instead of, jp2 ), so the file passes ISO 15444-15
conformance validation.

Notes

Appears to be a one-line addition in the code that builds the JPH File Type box's
compatibility list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions