Also dump the image info as well as cp info.

This commit is contained in:
Mathieu Malaterre 2010-06-22 14:03:52 +00:00
parent 6621494d9d
commit f30f4c744e
4 changed files with 11 additions and 4 deletions

View File

@ -7,6 +7,7 @@ What's New for OpenJPEG
June 22, 2010
+ [MM] Apply patch from w. szukalski (sent to list)
+ [MM] Also dump the image info as well as cp info.
June 21, 2010
+ [MM] Added a j2k_dump to simply dump the parameter of a J2K file

View File

@ -302,8 +302,6 @@ void info_callback(const char *msg, void *client_data) {
fprintf(stdout, "[INFO] %s", msg);
}
//void j2k_dump_cp(FILE *fd, opj_image_t * img, opj_cp_t * cp);
/* -------------------------------------------------------------------------- */
int main(int argc, char *argv[])
@ -425,7 +423,10 @@ int main(int argc, char *argv[])
opj_cio_close(cio);
return 1;
}
/* dump */
/* dump image */
j2k_dump_image(stdout, image);
/* dump cp */
j2k_dump_cp(stdout, image, ((opj_j2k_t*)dinfo->j2k_handle)->cp);
/* close the byte stream */
@ -469,7 +470,10 @@ int main(int argc, char *argv[])
opj_cio_close(cio);
return 1;
}
/* dump */
/* dump image */
j2k_dump_image(stdout, image);
/* dump cp */
j2k_dump_cp(stdout, image, ((opj_jp2_t*)dinfo->jp2_handle)->j2k->cp);
/* close the byte stream */

View File

@ -268,6 +268,7 @@ void j2k_dump_image(FILE *fd, opj_image_t * img) {
fprintf(fd, " comp %d {\n", compno);
fprintf(fd, " dx=%d, dy=%d\n", comp->dx, comp->dy);
fprintf(fd, " prec=%d\n", comp->prec);
//fprintf(fd, " bpp=%d\n", comp->bpp);
fprintf(fd, " sgnd=%d\n", comp->sgnd);
fprintf(fd, " }\n");
}

View File

@ -438,6 +438,7 @@ Encode an image into a JPEG-2000 codestream
*/
bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info);
void j2k_dump_image(FILE *fd, opj_image_t * img);
void j2k_dump_cp(FILE *fd, opj_image_t * img, opj_cp_t * cp);
/* ----------------------------------------------------------------------- */
/*@}*/