1 #ifndef __JBXL_JP2K_TOOL_H_
2 #define __JBXL_JP2K_TOOL_H_
18 #ifndef HAVE_OPENJPEG_H
19 #ifndef DISABLE_OPENJPEG
20 #define DISABLE_OPENJPEG
24 #ifdef DISABLE_OPENJPEG
25 #undef ENABLE_OPENJPEG
29 #ifdef ENABLE_OPENJPEG
32 #define OPENJPEG_VER 12
35 #define JP2K_VER_12 12
36 #define JP2K_VER_14 14
37 #define JP2K_VER_15 15
38 #define JP2K_VER_20 20
39 #define JP2K_VER_21 21
45 #if OPENJPEG_VER <= JP2K_VER_15
49 #pragma comment(lib, "LibOpenJPEGd.lib")
51 #pragma comment(lib, "LibOpenJPEG.lib")
54 #elif OPENJPEG_VER == JP2K_VER_21
56 #pragma comment(lib, "openjp2.lib")
60 #pragma comment(lib, "openjp2.lib")
67 #define JP2K_MAGIC_RFC3745_JP2 "\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a"
68 #define JP2K_MAGIC_JP2 "\x0d\x0a\x87\x0a"
69 #define JP2K_MAGIC_J2K "\xff\x4f\xff\x51"
71 #define JP2K_FMT_NONE 0
72 #define JP2K_FMT_JP2 1
73 #define JP2K_FMT_J2K 2
74 #define JP2K_FMT_JPT 3
99 #if OPENJPEG_VER <= JP2K_VER_15
101 #elif OPENJPEG_VER >= JP2K_VER_21