osamu620 / OpenHTJ2K

An open source implementation of ITU-T Rec.814 | ISO 15444-15 (a.k.a. HTJ2K).
BSD 3-Clause "New" or "Revised" License
35 stars 10 forks source link

Documentation of supported output file extensions and their effects doesn't reflect encoder behaviour #150

Closed bitsgalore closed 10 months ago

bitsgalore commented 10 months ago

Both the project readme and open_htj2k_enc's helper text provide conflicting and partially inaccurate information on recognized file extensions for the output file, and their effect on the resulting file formats.

The readme says this (under Supported file types):

output codestreams: .j2k, .j2c, .jphc (Part 15 codestream), .jph (Part 15 file format)

Whereas open_htj2k_enc's helper text says something different:

-o: Output codestream .jhc or .j2c are recommended as the extension.

I tried out all listed extensions, and ended up with this:

Adding to the confusion here is the use of "output codestream" (both in the readme and the helper text), since this option really defines an output file. This file can either be a Part 15 codestream, or a JPH file (in which case it isn't a codestream!).

Looking at E.2.2 and E.3.2 (Registration) in ISO/IEC 15444-15:2019 (E), this lists .jph as the registered extension for JPH files, and .jhc as the registered extension for codestreams. It doesn't mention a .jphc extension, although jphc is listed as a subtype name for codestreams.

My suggestion would be to change the description of the -o option to "output file" (both in the readme and the helper text), and stick to these conventions for the output extensions:

osamu620 commented 10 months ago

@bitsgalore You are right. At the time of development of this library, HTJ2K-related extensions were not fixed. Now we have stable names of extensions, it absolutely makes sense to adopt your suggestion. I will fix this up soon.

osamu620 commented 10 months ago

This issue has been fixed by #152