WIP: add support of jp2 for new j2k_dump function and some other small stuff