(thanks to Winfried for his help)

* [antonin] changed remaining "WIN32" to "_WIN32"
! [antonin] libopenjpeg has no more dependency on LCMS lib. Everything concerning color (icc profile, conversion to rgb, etc) has been put outside libopenjpeg and is used in j2k_to_image.c and mj2_to_frames.c.
- [antonin] removed "opj_convert{.c,.h}"
+ [antonin] added a directory "common/" that contains "getopt{.c,.h}" (previously in "codec/compat").
+ [antonin] added files "color{.c,.h}" in "common/" that define the code for icc profile management and sycc_to_rgb conversion
+ [antonin] added "common/format_defs.h" that contains common definitions used in image_to_j2k, j2k_to_image, j2k_dump.
This commit is contained in:
Antonin Descampe
2010-12-08 11:06:41 +00:00
parent 59d9b97ffe
commit d08a96e251
45 changed files with 1144 additions and 740 deletions

View File

@@ -29,40 +29,29 @@
#include <stdlib.h>
#include <math.h>
#ifdef _WIN32
#include "windirent.h"
#else
#include <dirent.h>
#endif /* _WIN32 */
#ifdef _WIN32
#include <windows.h>
#else
#include <strings.h>
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
#endif /* _WIN32 */
#include "opj_config.h"
#include "openjpeg.h"
#include "../libopenjpeg/j2k.h"
#include "../libopenjpeg/jp2.h"
#include "compat/getopt.h"
#include "getopt.h"
#include "convert.h"
#ifdef WIN32
#include "windirent.h"
#else
#include <dirent.h>
#endif /* WIN32 */
#include "index.h"
#ifndef WIN32
#include <strings.h>
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
#endif
/* ----------------------------------------------------------------------- */
#define J2K_CFMT 0
#define JP2_CFMT 1
#define JPT_CFMT 2
#define PXM_DFMT 10
#define PGX_DFMT 11
#define BMP_DFMT 12
#define YUV_DFMT 13
#define TIF_DFMT 14
#define RAW_DFMT 15
#define TGA_DFMT 16
#define PNG_DFMT 17
/* ----------------------------------------------------------------------- */
#include "format_defs.h"
typedef struct dircnt{
/** Buffer for holding images read from Directory*/
@@ -477,6 +466,10 @@ int main(int argc, char *argv[])
return 1;
}
/* dump image */
if(image->icc_profile_buf)
{
free(image->icc_profile_buf); image->icc_profile_buf = NULL;
}
j2k_dump_image(stdout, image);
/* dump cp */