[trunk] Backport from OPJViewer version 1.5 over to trunk
This commit is contained in:
parent
004b6ed60f
commit
7abbe1e8d8
|
@ -0,0 +1,25 @@
|
|||
PROJECT(viewer CXX)
|
||||
|
||||
FIND_PACKAGE(wxWidgets REQUIRED)
|
||||
INCLUDE(${wxWidgets_USE_FILE})
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
)
|
||||
|
||||
# original flags:
|
||||
# -DUSE_JPWL -DwxUSE_LIBOPENJPEG -DwxUSE_GUI=1 -DOPJ_STATIC -DOPJ_HTMLABOUT -DOPJ_INICONFIG -DUSE_JPSEC -DOPJ_MANYFORMATS
|
||||
ADD_DEFINITIONS(-DwxUSE_LIBOPENJPEG -DOPENJPEG_VERSION="1.5.0")
|
||||
SET(OPJV_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/imagjpeg2000.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/wxj2kparser.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJViewer.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/wxjp2parser.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJDialogs.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJThreads.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJAbout.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../codec/index.c
|
||||
)
|
||||
ADD_EXECUTABLE(opjviewer ${OPJV_SRCS})
|
||||
TARGET_LINK_LIBRARIES(opjviewer ${wxWidgets_LIBRARIES} openjpeg)
|
|
@ -360,6 +360,22 @@ wxPanel* OPJDecoderDialog::CreatePart11SettingsPage(wxWindow* parent)
|
|||
return panel;
|
||||
}
|
||||
|
||||
void OPJDecoderDialog::OnEnableJPWL(wxCommandEvent& event)
|
||||
{
|
||||
if (event.IsChecked()) {
|
||||
wxLogMessage(wxT("JPWL enabled"));
|
||||
m_expcompsCtrl->Enable(true);
|
||||
m_maxtilesCtrl->Enable(true);
|
||||
} else {
|
||||
wxLogMessage(wxT("JPWL disabled"));
|
||||
m_expcompsCtrl->Enable(false);
|
||||
m_maxtilesCtrl->Enable(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // USE_JPWL
|
||||
|
||||
void OPJDecoderDialog::OnEnableDeco(wxCommandEvent& event)
|
||||
{
|
||||
size_t pp;
|
||||
|
@ -384,22 +400,6 @@ void OPJDecoderDialog::OnEnableDeco(wxCommandEvent& event)
|
|||
|
||||
}
|
||||
|
||||
void OPJDecoderDialog::OnEnableJPWL(wxCommandEvent& event)
|
||||
{
|
||||
if (event.IsChecked()) {
|
||||
wxLogMessage(wxT("JPWL enabled"));
|
||||
m_expcompsCtrl->Enable(true);
|
||||
m_maxtilesCtrl->Enable(true);
|
||||
} else {
|
||||
wxLogMessage(wxT("JPWL disabled"));
|
||||
m_expcompsCtrl->Enable(false);
|
||||
m_maxtilesCtrl->Enable(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // USE_JPWL
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1373,6 +1373,8 @@ void OPJFrame::OnFileSaveAs(wxCommandEvent& WXUNUSED(event))
|
|||
wxT("JPEG 2000 codestream (*.j2k)|*.j2k")
|
||||
wxT("|JPEG 2000 file format (*.jp2)|*.jp2");
|
||||
#endif
|
||||
#else
|
||||
wxT("Houston we have a problem");
|
||||
#endif
|
||||
|
||||
wxFileDialog dialog(this, _T("Save image file"),
|
||||
|
|
|
@ -214,8 +214,8 @@ class OPJViewerApp: public wxApp
|
|||
#ifdef USE_JPWL
|
||||
bool m_enablejpwl, m_enablejpwle;
|
||||
int m_expcomps, m_maxtiles;
|
||||
int m_framewidth, m_frameheight;
|
||||
#endif // USE_JPWL
|
||||
int m_framewidth, m_frameheight;
|
||||
|
||||
// encoding engine parameters
|
||||
wxString m_subsampling, m_origin, m_rates, m_comment, m_index, m_quality;
|
||||
|
@ -782,9 +782,10 @@ public:
|
|||
#ifdef USE_JPWL
|
||||
void OnEnableJPWL(wxCommandEvent& event);
|
||||
wxPanel* CreatePart11SettingsPage(wxWindow* parent);
|
||||
wxSpinCtrl *m_expcompsCtrl, *m_framenumCtrl, *m_maxtilesCtrl;
|
||||
wxSpinCtrl *m_expcompsCtrl, *m_maxtilesCtrl;
|
||||
wxCheckBox *m_enablejpwlCheck;
|
||||
#endif // USE_JPWL
|
||||
wxSpinCtrl *m_framenumCtrl;
|
||||
|
||||
|
||||
protected:
|
||||
|
|
|
@ -93,7 +93,7 @@ unsigned short int marker_val[] = {
|
|||
};
|
||||
|
||||
// Marker names
|
||||
char *marker_name[] = {
|
||||
static const char *marker_name[] = {
|
||||
"SOC", "SOT", "SOD", "EOC",
|
||||
"SIZ",
|
||||
"COD", "COC", "RGN", "QCD", "QCC", "POD",
|
||||
|
@ -109,7 +109,7 @@ char *marker_name[] = {
|
|||
};
|
||||
|
||||
// Marker descriptions
|
||||
char *marker_descr[] = {
|
||||
static const char *marker_descr[] = {
|
||||
"Start of codestream", "Start of tile-part", "Start of data", "End of codestream",
|
||||
"Image and tile size",
|
||||
"Coding style default", "Coding style component", "Region-of-interest", "Quantization default",
|
||||
|
|
Loading…
Reference in New Issue