[Pkg-phototools-devel] Bug#825339: Need public function to tell kernel type used (5x3 vs 9x7)

Mathieu Malaterre malat at debian.org
Thu May 26 09:25:12 UTC 2016

Package: libopenjp2-7-dev
Version: 2.1.0-2

AFAIK j2k.h and jp2.h header files are not installed on a standard
openjpeg installation. Is this intended ?
  Here is the issue I am currently facing, in order to reject lossy
JP2/J2K stream in clinical trial environment I had to code the

  int reversible;
  opj_j2k_t* j2k = NULL;
  opj_jp2_t* jp2 = NULL;

  case J2K_CFMT:
    j2k = (opj_j2k_t*)dinfo->j2k_handle;
    assert( j2k );
    reversible = j2k->cp->tcps->tccps->qmfbid;
  case JP2_CFMT:
    jp2 = (opj_jp2_t*)dinfo->jp2_handle;
    assert( jp2 );
    reversible = jp2->j2k->cp->tcps->tccps->qmfbid;
    gdcmErrorMacro( "Impossible happen" );
    return false;
  LossyFlag = !reversible;

Unfortunately I need to include j2k.h  / jp2.h which is completely
non-standard on linux distribution.

What other people recommend for this situation:

- Extend openjpeg installation mechanism to install j2k.h / jp2.h
- Extend openjpeg.h API to return the reversible flag.

More information about the Pkg-phototools-devel mailing list