diff --git a/README.md b/README.md index 3b5d21f6..d04ef903 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,8 @@ To see a help, use `-h` option. ## Supported file types ### Encoder - input image formats: .pgm, .ppm, .pgx, .tif (libtiff required) -- output codestreams: .j2k, .j2c, .jphc (Part 15 codestream), .jph (Part 15 file format) +- output codestreams: .jhc (Part 15 codestream, .j2k and .j2c can be used as aliases), .jph (Part 15 file format) + - Note: Specifying .jph as the output triggers a JPH file creation, otherwise just a codestream will be generated. ### Decoder -- input codestreams : .j2k, .j2c, .jphc +- input codestreams : .j2k, .j2c, .jhc - output image formats: .raw, .ppm, .pgm, .pgx diff --git a/source/apps/decoder/main_dec.cpp b/source/apps/decoder/main_dec.cpp index 9614a1b7..ba9358e8 100644 --- a/source/apps/decoder/main_dec.cpp +++ b/source/apps/decoder/main_dec.cpp @@ -47,7 +47,7 @@ void print_help(char *cmd) { printf("JPEG 2000 Part 1 and Part 15 decoder\n"); printf("USAGE: %s [options]\n\n", cmd); printf("OPTIONS:\n"); - printf("-i: Input file. .j2k, .j2c, .jhc, and .jphc are supported.\n"); + printf("-i: Input file. .j2k, .j2c, and .jhc are supported.\n"); printf(" .jp2 and .jph (box based file-format) are not supported.\n"); printf("-o: Output file. Supported formats are PPM, PGM, PGX and RAW.\n"); printf("-reduce n: Number of DWT resolution reduction.\n"); @@ -67,8 +67,8 @@ int main(int argc, char *argv[]) { } infile_ext_name = strrchr(infile_name, '.'); if (strcmp(infile_ext_name, ".j2k") != 0 && strcmp(infile_ext_name, ".j2c") != 0 - && strcmp(infile_ext_name, ".jhc") != 0 && strcmp(infile_ext_name, ".jphc") != 0) { - printf("ERROR: Supported extensions are .j2k, .j2c, .jhc, and .jphc\n"); + && strcmp(infile_ext_name, ".jhc") != 0) { + printf("ERROR: Supported extensions are .j2k, .j2c, .jhc\n"); exit(EXIT_FAILURE); } if (nullptr == (outfile_name = get_command_option(argc, argv, "-o"))) { diff --git a/source/apps/encoder/enc_utils.hpp b/source/apps/encoder/enc_utils.hpp index 4b9ce11b..a98fd725 100644 --- a/source/apps/encoder/enc_utils.hpp +++ b/source/apps/encoder/enc_utils.hpp @@ -37,7 +37,10 @@ void print_help(char *cmd) { printf("%s: JPEG 2000 Part 15 encoder\n", cmd); printf("USAGE: %s -i input-image(s) -o output-codestream [options...]\n\n", cmd); printf("-i: Input-image(s)\n PGM, PPM, and TIFF (optional, 8 or 16 bpp only) are supported.\n"); - printf("-o: Output codestream\n `.jhc` or `.j2c` are recommended as the extension.\n"); + printf( + "-o: Output codestream/file\n To create a codestream, `.jhc` or `.j2c` are recommended as the " + "extension.\n"); + printf(" Specifying `.jph` triggers a JPH file creation.\n"); printf(" Note: If this option is unspecified, encoding result is placed on a memory buffer.\n\n"); printf("OPTIONS:\n"); printf(