fixed options and help display (patch from winfried)
This commit is contained in:
parent
e65ef3a24f
commit
ddc9a278aa
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
October 18, 2010
|
||||||
|
* [antonin] fixed options and help display (patch from winfried)
|
||||||
|
|
||||||
October 18, 2010
|
October 18, 2010
|
||||||
! [szukw000]
|
! [szukw000]
|
||||||
doc/Makefile.am
|
doc/Makefile.am
|
||||||
|
|
|
@ -92,7 +92,7 @@ typedef struct img_folder{
|
||||||
}img_fol_t;
|
}img_fol_t;
|
||||||
|
|
||||||
void encode_help_display() {
|
void encode_help_display() {
|
||||||
fprintf(stdout,"HELP\n----\n\n");
|
fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
@ -145,9 +145,9 @@ void encode_help_display() {
|
||||||
fprintf(stdout,"-OutFor \n");
|
fprintf(stdout,"-OutFor \n");
|
||||||
fprintf(stdout," REQUIRED only if -ImgDir is used\n");
|
fprintf(stdout," REQUIRED only if -ImgDir is used\n");
|
||||||
fprintf(stdout," Need to specify only format without filename <BMP> \n");
|
fprintf(stdout," Need to specify only format without filename <BMP> \n");
|
||||||
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, BMP, TIF, RAW and TGA formats\n");
|
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, PNG, BMP, TIF, RAW and TGA formats\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-i : source file (-i source.pnm also *.pgm, *.ppm, *.bmp, *.tif, *.raw, *.tga) \n");
|
fprintf(stdout,"-i : source file (-i source.pnm also *.pgm, *.ppm, *.pgx, *png, *.bmp, *.tif, *.raw, *.tga) \n");
|
||||||
fprintf(stdout," When using this option -o must be used\n");
|
fprintf(stdout," When using this option -o must be used\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-o : destination file (-o dest.j2k or .jp2) \n");
|
fprintf(stdout,"-o : destination file (-o dest.j2k or .jp2) \n");
|
||||||
|
@ -596,11 +596,11 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* parse the command line */
|
/* parse the command line */
|
||||||
const char optlist[] = "i:o:hr:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:"
|
const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:"
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
"W:"
|
"W:"
|
||||||
#endif /* USE_JPWL */
|
#endif /* USE_JPWL */
|
||||||
;
|
"h";
|
||||||
|
|
||||||
totlen=sizeof(long_option);
|
totlen=sizeof(long_option);
|
||||||
img_fol->set_out_format=0;
|
img_fol->set_out_format=0;
|
||||||
|
@ -627,7 +627,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"!! Unrecognized format for infile : %s "
|
"!! Unrecognized format for infile : %s "
|
||||||
"[accept only *.pnm, *.pgm, *.ppm, *.pgx, *.bmp, *.tif, *.raw or *.tga] !!\n\n",
|
"[accept only *.pnm, *.pgm, *.ppm, *.pgx, *png, *.bmp, *.tif, *.raw or *.tga] !!\n\n",
|
||||||
infile);
|
infile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef struct img_folder{
|
||||||
}img_fol_t;
|
}img_fol_t;
|
||||||
|
|
||||||
void decode_help_display() {
|
void decode_help_display() {
|
||||||
fprintf(stdout,"HELP\n----\n\n");
|
fprintf(stdout,"HELP for j2k_dump\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
|
|
@ -88,7 +88,7 @@ typedef struct img_folder{
|
||||||
}img_fol_t;
|
}img_fol_t;
|
||||||
|
|
||||||
void decode_help_display() {
|
void decode_help_display() {
|
||||||
fprintf(stdout,"HELP\n----\n\n");
|
fprintf(stdout,"HELP for j2k_to_image\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
@ -105,14 +105,14 @@ void decode_help_display() {
|
||||||
fprintf(stdout," -OutFor \n");
|
fprintf(stdout," -OutFor \n");
|
||||||
fprintf(stdout," REQUIRED only if -ImgDir is used\n");
|
fprintf(stdout," REQUIRED only if -ImgDir is used\n");
|
||||||
fprintf(stdout," Need to specify only format without filename <BMP> \n");
|
fprintf(stdout," Need to specify only format without filename <BMP> \n");
|
||||||
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, BMP, TIF, RAW and TGA formats\n");
|
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, PNG, BMP, TIF, RAW and TGA formats\n");
|
||||||
fprintf(stdout," -i <compressed file>\n");
|
fprintf(stdout," -i <compressed file>\n");
|
||||||
fprintf(stdout," REQUIRED only if an Input image directory not specified\n");
|
fprintf(stdout," REQUIRED only if an Input image directory not specified\n");
|
||||||
fprintf(stdout," Currently accepts J2K-files, JP2-files and JPT-files. The file type\n");
|
fprintf(stdout," Currently accepts J2K-files, JP2-files and JPT-files. The file type\n");
|
||||||
fprintf(stdout," is identified based on its suffix.\n");
|
fprintf(stdout," is identified based on its suffix.\n");
|
||||||
fprintf(stdout," -o <decompressed file>\n");
|
fprintf(stdout," -o <decompressed file>\n");
|
||||||
fprintf(stdout," REQUIRED\n");
|
fprintf(stdout," REQUIRED\n");
|
||||||
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, BMP, TIF, RAW and TGA files\n");
|
fprintf(stdout," Currently accepts PGM, PPM, PNM, PGX, PNG, BMP, TIF, RAW and TGA files\n");
|
||||||
fprintf(stdout," Binary data is written to the file (not ascii). If a PGX\n");
|
fprintf(stdout," Binary data is written to the file (not ascii). If a PGX\n");
|
||||||
fprintf(stdout," filename is given, there will be as many output files as there are\n");
|
fprintf(stdout," filename is given, there will be as many output files as there are\n");
|
||||||
fprintf(stdout," components: an indice starting from 0 will then be appended to the\n");
|
fprintf(stdout," components: an indice starting from 0 will then be appended to the\n");
|
||||||
|
@ -245,14 +245,14 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
||||||
{"OutFor",REQ_ARG, NULL ,'O'},
|
{"OutFor",REQ_ARG, NULL ,'O'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const char optlist[] = "i:o:r:l:hx:"
|
const char optlist[] = "i:o:r:l:x:"
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
"W:"
|
"W:"
|
||||||
#endif /* USE_JPWL */
|
#endif /* USE_JPWL */
|
||||||
/* <<UniPG */
|
/* <<UniPG */
|
||||||
;
|
"h" ;
|
||||||
totlen=sizeof(long_option);
|
totlen=sizeof(long_option);
|
||||||
img_fol->set_out_format = 0;
|
img_fol->set_out_format = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -76,8 +76,8 @@ int main(int argc, char *argv[]) {
|
||||||
mj2_dparameters_t parameters;
|
mj2_dparameters_t parameters;
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("Bad syntax: Usage: MJ2_extractor mj2filename output_location\n");
|
printf("Usage: %s mj2filename output_location\n",argv[0]);
|
||||||
printf("Example: MJ2_extractor foreman.mj2 output/foreman\n");
|
printf("Example: %s foreman.mj2 output/foreman\n",argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ void info_callback(const char *msg, void *client_data) {
|
||||||
|
|
||||||
void help_display()
|
void help_display()
|
||||||
{
|
{
|
||||||
fprintf(stdout,"HELP\n----\n\n");
|
fprintf(stdout,"HELP for frames_to_mj2\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int c = getopt(argc, argv,
|
int c = getopt(argc, argv,
|
||||||
"i:o:r:q:f:t:n:c:b:p:s:d:h P:S:E:M:R:T:C:I:W:F:");
|
"i:o:r:q:f:t:n:c:b:p:s:d:P:S:E:M:R:T:C:I:W:F:h");
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
@ -611,7 +611,7 @@ int main(int argc, char **argv)
|
||||||
/* -------------- */
|
/* -------------- */
|
||||||
if (!mj2_parameters.cod_format || !mj2_parameters.decod_format) {
|
if (!mj2_parameters.cod_format || !mj2_parameters.decod_format) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Correct usage: mj2_encoder -i yuv-file -o mj2-file (+ options)\n");
|
"Usage: %s -i yuv-file -o mj2-file (+ options)\n",argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,7 @@ int main(int argc, char *argv[]) {
|
||||||
unsigned int numframes = 0;
|
unsigned int numframes = 0;
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("Bad syntax: Usage: mj2_to_frames inputfile.mj2 outputfile.yuv\n");
|
printf("Usage: %s inputfile.mj2 outputfile.yuv\n",argv[0]);
|
||||||
printf("Example: MJ2_decoder foreman.mj2 foreman.yuv\n");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,8 +241,8 @@ int main(int argc, char *argv[]) {
|
||||||
mj2_cparameters_t parameters;
|
mj2_cparameters_t parameters;
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("Bad syntax: Usage: MJ2_Wrapper source_location mj2_filename\n");
|
printf("Usage: %s source_location mj2_filename\n",argv[0]);
|
||||||
printf("Example: MJ2_Wrapper input/input output.mj2\n");
|
printf("Example: %s input/input output.mj2\n",argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue