update libopenjpeg from 1.3 to 1.5, since 1.3 has a bug saving alpha channels.

the patches/ dir is NOT applied but perhaps we can get OSX and BSD working using the opj_config.h
This commit is contained in:
2012-06-21 09:47:30 +00:00
parent 11cb213d45
commit c250ab893c
37 changed files with 2833 additions and 607 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, Herv<EFBFBD> Drolon, FreeImage Team
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,8 +29,9 @@
/* ==========================================================
Utility functions
==========================================================*/
#if 0
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#ifdef OPJ_CODE_NOT_USED
#ifndef _WIN32
static char*
i2a(unsigned i, char *a, unsigned r) {
if (i/r > 0) a = i2a(i/r,a,r);
@@ -57,8 +58,8 @@ _itoa(int i, char *a, int r) {
return a;
}
#endif /* !WIN32 */
#endif /* unused - campbell */
#endif /* !_WIN32 */
#endif
/* ----------------------------------------------------------------------- */
opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) {
@@ -72,7 +73,7 @@ opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_
return NULL;
}
bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
opj_msg_callback msg_handler = NULL;
@@ -92,10 +93,10 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
break;
}
if(msg_handler == NULL) {
return false;
return OPJ_FALSE;
}
} else {
return false;
return OPJ_FALSE;
}
if ((fmt != NULL) && (event_mgr != NULL)) {
@@ -116,6 +117,6 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
msg_handler(message, cinfo->client_data);
}
return true;
return OPJ_TRUE;
}