OpenJPEG: support building against both 1.5 and 2.3.
Patch porting to OpenJPEG 2.3 is by Campbell. Once all platforms are upgraded we can remove the code for 1.5, and upgrade or remove the openjpeg version from extern/. This intermediate step makes it possible for platform maintainers to upgrade to 2.3 without breaking other platforms.
This commit is contained in:
@@ -82,8 +82,9 @@ int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags);
|
||||
|
||||
/* jp2 */
|
||||
int imb_is_a_jp2(const unsigned char *buf);
|
||||
struct ImBuf *imb_jp2_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
|
||||
int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags);
|
||||
struct ImBuf *imb_load_jp2(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
|
||||
struct ImBuf *imb_load_jp2_filepath(const char *name, int flags, char colorspace[IM_MAX_SPACE]);
|
||||
int imb_save_jp2(struct ImBuf *ibuf, const char *name, int flags);
|
||||
|
||||
/* jpeg */
|
||||
int imb_is_a_jpeg(const unsigned char *mem);
|
||||
|
@@ -77,7 +77,7 @@ const ImFileType IMB_FILE_TYPES[] = {
|
||||
{imb_initopenexr, NULL, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_OPENEXR, COLOR_ROLE_DEFAULT_FLOAT},
|
||||
#endif
|
||||
#ifdef WITH_OPENJPEG
|
||||
{NULL, NULL, imb_is_a_jp2, NULL, imb_ftype_default, imb_jp2_decode, NULL, imb_savejp2, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_JP2, COLOR_ROLE_DEFAULT_BYTE},
|
||||
{NULL, NULL, imb_is_a_jp2, NULL, imb_ftype_default, imb_load_jp2, NULL, imb_save_jp2, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_JP2, COLOR_ROLE_DEFAULT_BYTE},
|
||||
#endif
|
||||
#ifdef WITH_DDS
|
||||
{NULL, NULL, imb_is_a_dds, NULL, imb_ftype_default, imb_load_dds, NULL, NULL, NULL, 0, IMB_FTYPE_DDS, COLOR_ROLE_DEFAULT_BYTE},
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user