re-folded in changes for jp2k support
partial implementation conflicted