[1.5] Use UNIX eol for source code

This commit is contained in:
Mathieu Malaterre 2012-03-02 09:33:50 +00:00
parent 0c7b21c46f
commit 675f34fabd
23 changed files with 10406 additions and 10406 deletions

View File

@ -1,25 +1,25 @@
PROJECT(viewer CXX) PROJECT(viewer CXX)
FIND_PACKAGE(wxWidgets REQUIRED) FIND_PACKAGE(wxWidgets REQUIRED)
INCLUDE(${wxWidgets_USE_FILE}) INCLUDE(${wxWidgets_USE_FILE})
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/..
) )
# original flags: # original flags:
# -DUSE_JPWL -DwxUSE_LIBOPENJPEG -DwxUSE_GUI=1 -DOPJ_STATIC -DOPJ_HTMLABOUT -DOPJ_INICONFIG -DUSE_JPSEC -DOPJ_MANYFORMATS # -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") ADD_DEFINITIONS(-DwxUSE_LIBOPENJPEG -DOPENJPEG_VERSION="1.5.0")
SET(OPJV_SRCS SET(OPJV_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/source/imagjpeg2000.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/imagjpeg2000.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/wxj2kparser.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/wxj2kparser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJViewer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJViewer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/wxjp2parser.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/wxjp2parser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJDialogs.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJDialogs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJThreads.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJThreads.cpp
${CMAKE_CURRENT_SOURCE_DIR}/source/OPJAbout.cpp ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJAbout.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../codec/index.c ${CMAKE_CURRENT_SOURCE_DIR}/../codec/index.c
) )
ADD_EXECUTABLE(opjviewer ${OPJV_SRCS}) ADD_EXECUTABLE(opjviewer ${OPJV_SRCS})
TARGET_LINK_LIBRARIES(opjviewer ${wxWidgets_LIBRARIES} openjpeg) TARGET_LINK_LIBRARIES(opjviewer ${wxWidgets_LIBRARIES} openjpeg)

View File

@ -1,48 +1,48 @@
; Script generated by the Inno Setup Script Wizard. ; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup] [Setup]
AppName=OPJViewer AppName=OPJViewer
AppVerName=OPJViewer 0.4 beta AppVerName=OPJViewer 0.4 beta
AppPublisher=OpenJPEG AppPublisher=OpenJPEG
AppPublisherURL=http://www.openjpeg.org AppPublisherURL=http://www.openjpeg.org
AppSupportURL=http://www.openjpeg.org AppSupportURL=http://www.openjpeg.org
AppUpdatesURL=http://www.openjpeg.org AppUpdatesURL=http://www.openjpeg.org
DefaultDirName={pf}\OPJViewer DefaultDirName={pf}\OPJViewer
DefaultGroupName=OPJViewer DefaultGroupName=OPJViewer
OutputDir=setup OutputDir=setup
OutputBaseFilename=OPJViewer04beta_setup OutputBaseFilename=OPJViewer04beta_setup
Compression=lzma Compression=lzma
SolidCompression=true SolidCompression=true
InfoBeforeFile=source\readmebefore.txt InfoBeforeFile=source\readmebefore.txt
InfoAfterFile=source\readmeafter.txt InfoAfterFile=source\readmeafter.txt
LicenseFile=source\license.txt LicenseFile=source\license.txt
VersionInfoVersion=0.4.0.0 VersionInfoVersion=0.4.0.0
VersionInfoCompany=OpenJPEG VersionInfoCompany=OpenJPEG
VersionInfoDescription=JPEG 2000 viewer VersionInfoDescription=JPEG 2000 viewer
ShowLanguageDialog=yes ShowLanguageDialog=yes
SetupIconFile=source\OPJViewer.ico SetupIconFile=source\OPJViewer.ico
[Languages] [Languages]
Name: english; MessagesFile: compiler:Default.isl Name: english; MessagesFile: compiler:Default.isl
[Tasks] [Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files] [Files]
Source: Release\OPJViewer.exe; DestDir: {app}; Flags: ignoreversion Source: Release\OPJViewer.exe; DestDir: {app}; Flags: ignoreversion
;Source: about\about.htm; DestDir: {app}/about; Flags: ignoreversion ;Source: about\about.htm; DestDir: {app}/about; Flags: ignoreversion
;Source: about\opj_logo.png; DestDir: {app}/about; Flags: ignoreversion ;Source: about\opj_logo.png; DestDir: {app}/about; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] [Icons]
Name: {group}\OPJViewer; Filename: {app}\OPJViewer.exe; WorkingDir: {app}; IconIndex: 0 Name: {group}\OPJViewer; Filename: {app}\OPJViewer.exe; WorkingDir: {app}; IconIndex: 0
Name: {group}\{cm:UninstallProgram,OPJViewer}; Filename: {uninstallexe} Name: {group}\{cm:UninstallProgram,OPJViewer}; Filename: {uninstallexe}
Name: {userdesktop}\OPJViewer; Filename: {app}\OPJViewer.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0 Name: {userdesktop}\OPJViewer; Filename: {app}\OPJViewer.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0
[Run] [Run]
Filename: {app}\OPJViewer.exe; Description: {cm:LaunchProgram,OPJViewer}; Flags: nowait postinstall skipifsilent; WorkingDir: {app} Filename: {app}\OPJViewer.exe; Description: {cm:LaunchProgram,OPJViewer}; Flags: nowait postinstall skipifsilent; WorkingDir: {app}
[Registry] [Registry]
Root: HKCU; Subkey: Software\OpenJPEG; ValueType: none; ValueData: 1; Flags: uninsdeletekey; Tasks: ; Languages: Root: HKCU; Subkey: Software\OpenJPEG; ValueType: none; ValueData: 1; Flags: uninsdeletekey; Tasks: ; Languages:
Root: HKCU; Subkey: Software\OpenJPEG\OPJViewer; ValueType: none; ValueData: 1; Flags: uninsdeletekey; Tasks: ; Languages: Root: HKCU; Subkey: Software\OpenJPEG\OPJViewer; ValueType: none; ValueData: 1; Flags: uninsdeletekey; Tasks: ; Languages:

View File

@ -1,100 +1,100 @@
=============================================================================== ===============================================================================
JPEG2000 Visualization Software - OPJViewer JPEG2000 Visualization Software - OPJViewer
Version 0.4 beta Version 0.4 beta
=============================================================================== ===============================================================================
1. Scope 1. Scope
============= =============
This document describes the installation and use of the OPJViewer in the framework of OpenJPEG library. This document describes the installation and use of the OPJViewer in the framework of OpenJPEG library.
This implementation has been developed using the OpenJPEG library as decoding engine and wxWidgets 2.8 as GUI engine. This implementation has been developed using the OpenJPEG library as decoding engine and wxWidgets 2.8 as GUI engine.
If you find some bugs or if you have problems using the viewer, please send an e-mail to jpwl@diei.unipg.it If you find some bugs or if you have problems using the viewer, please send an e-mail to jpwl@diei.unipg.it
2. Installing the viewer 2. Installing the viewer
========================== ==========================
There are two options available, at the moment: There are two options available, at the moment:
a) compile from source code a) compile from source code
b) download a precompiled binary. b) download a precompiled binary.
In order to use option a), it is mandatory to have compiled and built the LibOpenJPEG_JPWL library and the wxWidgets 2.8 framework (you have to download it from http://www.wxwidgets.org/ and compile the wx* libraries). In order to use option a), it is mandatory to have compiled and built the LibOpenJPEG_JPWL library and the wxWidgets 2.8 framework (you have to download it from http://www.wxwidgets.org/ and compile the wx* libraries).
2.1. Compiling the source code in Windows 2.1. Compiling the source code in Windows
------------------------------------------- -------------------------------------------
The steps required to compile the viewer under windows are: The steps required to compile the viewer under windows are:
a) Download at least the libopenjpeg, jpwl, and opjviewer folders from the SVN trunk. a) Download at least the libopenjpeg, jpwl, and opjviewer folders from the SVN trunk.
b) Open the OPJViewer.dsw workspace with Visual C++ 6 and activate the "OPJViewer - Win32 Release" configuration. b) Open the OPJViewer.dsw workspace with Visual C++ 6 and activate the "OPJViewer - Win32 Release" configuration.
c) In the configuration settings, go to the C++ tab and modify the wxWidgets paths in order to reflect your wx* install configuration (Preprocessor -> Additional include directories): simply update each instance of the two wx paths, do not remove or add them. c) In the configuration settings, go to the C++ tab and modify the wxWidgets paths in order to reflect your wx* install configuration (Preprocessor -> Additional include directories): simply update each instance of the two wx paths, do not remove or add them.
d) In the configuration settings, go to the Link tab and modify the wxWidgets path in order to reflect your wx* install configuration (Input -> Additional library path): simply update the wx path. d) In the configuration settings, go to the Link tab and modify the wxWidgets path in order to reflect your wx* install configuration (Input -> Additional library path): simply update the wx path.
e) In the configuration settings, go to the Resources tab and modify the wxWidgets path in order to reflect your wx* install configuration (Additional resource include directories): simply update the wx path. e) In the configuration settings, go to the Resources tab and modify the wxWidgets path in order to reflect your wx* install configuration (Additional resource include directories): simply update the wx path.
f) Build! f) Build!
g) Run! g) Run!
h) (OPTIONAL) Prepare an installer by compiling the InnoSetup script OPJViewer.iss (you need to download InnoSetup from http://www.jrsoftware.org/isinfo.php). h) (OPTIONAL) Prepare an installer by compiling the InnoSetup script OPJViewer.iss (you need to download InnoSetup from http://www.jrsoftware.org/isinfo.php).
2.1.1 Additional libraries 2.1.1 Additional libraries
---------------------------- ----------------------------
Since we are also working on the Digital Cinema JPEG 2000, we are integrating the viewer with the MXF library, which is used to prepare the DCPs for digital movies. You can enable its linking in the code by specifying the USE_MXF preprocessor directive but, remember, the integration is at a very early stage. Since we are also working on the Digital Cinema JPEG 2000, we are integrating the viewer with the MXF library, which is used to prepare the DCPs for digital movies. You can enable its linking in the code by specifying the USE_MXF preprocessor directive but, remember, the integration is at a very early stage.
2.2. Compiling the source code in Unix-like systems 2.2. Compiling the source code in Unix-like systems
----------------------------------------------------- -----------------------------------------------------
The porting is possible and under way. The porting is possible and under way.
3. General information on the viewer 3. General information on the viewer
==================================== ====================================
This viewer is conceived to open and display information and image content of J2K, JP2, and MJ2 files. This viewer is conceived to open and display information and image content of J2K, JP2, and MJ2 files.
The viewer application interface is divided into three main panels: The viewer application interface is divided into three main panels:
- a browsing pane; - a browsing pane;
- a viewing pane; - a viewing pane;
- a log/peek pane. - a log/peek pane.
The browsing pane will present the markers or boxes hierarchy, with position (byte number where marker/box starts and stops) and length information (i.e., inner length as signalled by marker/box and total length, with marker/box sign included), in the following form: The browsing pane will present the markers or boxes hierarchy, with position (byte number where marker/box starts and stops) and length information (i.e., inner length as signalled by marker/box and total length, with marker/box sign included), in the following form:
filename filename
| |
|_ #000: Marker/Box short name (Hex code) |_ #000: Marker/Box short name (Hex code)
| | | |
| |_ *** Marker/Box long name *** | |_ *** Marker/Box long name ***
| |_ startbyte > stopbyte, inner_length + marker/box sign length (total length) | |_ startbyte > stopbyte, inner_length + marker/box sign length (total length)
| |_ Additional info, depending on the marker/box type | |_ Additional info, depending on the marker/box type
| |_ ... | |_ ...
| |
|_ #001: Marker/Box short name (Hex code) |_ #001: Marker/Box short name (Hex code)
| | | |
| |_ ... | |_ ...
| |
... ...
The viewing pane will display the decoded image contained in the JPEG 2000 file. The viewing pane will display the decoded image contained in the JPEG 2000 file.
It should display correctly images as large as 4000x2000, provided that a couple of GB of RAM are available. Nothing is known about the display of larger sizes: let us know if you manage to get it working. It should display correctly images as large as 4000x2000, provided that a couple of GB of RAM are available. Nothing is known about the display of larger sizes: let us know if you manage to get it working.
The log/peek pane is shared among two different subpanels: The log/peek pane is shared among two different subpanels:
- the log panel will report a lot of debugging info coming out from the wx GUI as well as from the openjpeg library - the log panel will report a lot of debugging info coming out from the wx GUI as well as from the openjpeg library
- the peek pane tries to give a peek on the codestream/file portion which is currently selected in the browsing pane. It shows both hex and ascii values corresponding to the marker/box section. - the peek pane tries to give a peek on the codestream/file portion which is currently selected in the browsing pane. It shows both hex and ascii values corresponding to the marker/box section.
4. Known bugs and limitations 4. Known bugs and limitations
=============================== ===============================
4.1. Bugs 4.1. Bugs
----------- -----------
* *
4.2. Limitations 4.2. Limitations
------------------ ------------------
* For mj2 files, rendering is only in B/W * For mj2 files, rendering is only in B/W

View File

@ -1,36 +1,36 @@
<html> <html>
<body bgcolor="#FFFFFF"> <body bgcolor="#FFFFFF">
<table cellspacing=7 cellpadding=1 border=0 width="100%"> <table cellspacing=7 cellpadding=1 border=0 width="100%">
<tr> <tr>
<td rowspan=3 valign=top align=center width=70> <td rowspan=3 valign=top align=center width=70>
<img src="opj_logo.png"><br><br> <img src="opj_logo.png"><br><br>
</td> </td>
<td align=center> <td align=center>
<font size=+2 color="#000000"><b>OPJViewer v0.2 alpha</b></font><br> <font size=+2 color="#000000"><b>OPJViewer v0.2 alpha</b></font><br>
<font size=+0 color="#000000"><b>A JPEG 2000 image viewer</b></font> <font size=+0 color="#000000"><b>A JPEG 2000 image viewer</b></font>
</td> </td>
</tr> </tr>
<tr height=3 valign=center> <tr height=3 valign=center>
<td valign=center bgcolor=#cc3300></td> <td valign=center bgcolor=#cc3300></td>
</tr> </tr>
<tr> <tr>
<td align=justify> <td align=justify>
<center><font size=+0 color="#000000"><a href="http://www.openjpeg.org/">OpenJPEG</a></font></center> <center><font size=+0 color="#000000"><a href="http://www.openjpeg.org/">OpenJPEG</a></font></center>
<font size=-1 color="#000000">The OpenJPEG library is an open-source JPEG 2000 codec written in C language. <font size=-1 color="#000000">The OpenJPEG library is an open-source JPEG 2000 codec written in C language.
In addition to the basic codec, various other features are under development, In addition to the basic codec, various other features are under development,
among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool
useful for the JPIP protocol, JPWL-tools for error-resilience, ...</font> useful for the JPIP protocol, JPWL-tools for error-resilience, ...</font>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan=2 bgcolor="#CC3300" height=3 valign=center></td> <td colspan=2 bgcolor="#CC3300" height=3 valign=center></td>
</tr> </tr>
<tr> <tr>
<td colspan=2> <td colspan=2>
<font size=-2 color="#444444">OpenJPEG is &copy; 2002-2007 <a href="http://www.tele.ucl.ac.be/">TELE</a> - <a href="http://www.uclouvain.be/">Université Catholique de Louvain</a></font><br> <font size=-2 color="#444444">OpenJPEG is &copy; 2002-2007 <a href="http://www.tele.ucl.ac.be/">TELE</a> - <a href="http://www.uclouvain.be/">Université Catholique de Louvain</a></font><br>
<font size=-2 color="#444444">OPJViewer is also &copy; 2005-2007 <a href="http://dsplab.diei.unipg.it/">DSPLab</a> - <a href="http://www.unipg.it/">Università degli studi di Perugia</a></font> <font size=-2 color="#444444">OPJViewer is also &copy; 2005-2007 <a href="http://dsplab.diei.unipg.it/">DSPLab</a> - <a href="http://www.unipg.it/">Università degli studi di Perugia</a></font>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,87 +1,87 @@
/* /*
* Copyright (c) 2007, Digital Signal Processing Laboratory, Universita'  degli studi di Perugia (UPG), Italy * Copyright (c) 2007, Digital Signal Processing Laboratory, Universita'  degli studi di Perugia (UPG), Italy
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef USE_MXF #ifdef USE_MXF
#include "mxflib/mxflib.h" #include "mxflib/mxflib.h"
#endif // USE_MXF #endif // USE_MXF
#include "OPJViewer.h" #include "OPJViewer.h"
// about window for the frame // about window for the frame
void OPJFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void OPJFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
#ifdef OPJ_HTMLABOUT #ifdef OPJ_HTMLABOUT
#include "about_htm.h" #include "about_htm.h"
#include "opj_logo.xpm" #include "opj_logo.xpm"
wxBoxSizer *topsizer; wxBoxSizer *topsizer;
wxHtmlWindow *html; wxHtmlWindow *html;
wxDialog dlg(this, wxID_ANY, wxString(_("About"))); wxDialog dlg(this, wxID_ANY, wxString(_("About")));
wxMemoryFSHandler::AddFile(wxT("opj_logo.xpm"), wxBitmap(opj_logo), wxBITMAP_TYPE_XPM); wxMemoryFSHandler::AddFile(wxT("opj_logo.xpm"), wxBitmap(opj_logo), wxBITMAP_TYPE_XPM);
topsizer = new wxBoxSizer(wxVERTICAL); topsizer = new wxBoxSizer(wxVERTICAL);
html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(320, 250), wxHW_SCROLLBAR_NEVER); html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(320, 250), wxHW_SCROLLBAR_NEVER);
html->SetBorders(0); html->SetBorders(0);
//html->LoadPage(wxT("about/about.htm")); //html->LoadPage(wxT("about/about.htm"));
//html->SetPage("<html><body>Hello, world!</body></html>"); //html->SetPage("<html><body>Hello, world!</body></html>");
html->SetPage(htmlaboutpage); html->SetPage(htmlaboutpage);
html->SetSize(html->GetInternalRepresentation()->GetWidth(), html->SetSize(html->GetInternalRepresentation()->GetWidth(),
html->GetInternalRepresentation()->GetHeight()); html->GetInternalRepresentation()->GetHeight());
topsizer->Add(html, 1, wxALL, 10); topsizer->Add(html, 1, wxALL, 10);
topsizer->Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10); topsizer->Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
wxButton *bu1 = new wxButton(&dlg, wxID_OK, wxT("OK")); wxButton *bu1 = new wxButton(&dlg, wxID_OK, wxT("OK"));
bu1->SetDefault(); bu1->SetDefault();
topsizer->Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15); topsizer->Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
dlg.SetSizer(topsizer); dlg.SetSizer(topsizer);
topsizer->Fit(&dlg); topsizer->Fit(&dlg);
dlg.ShowModal(); dlg.ShowModal();
#else #else
wxMessageBox(wxString::Format(OPJ_APPLICATION_TITLEBAR wxMessageBox(wxString::Format(OPJ_APPLICATION_TITLEBAR
wxT("\n\n") wxT("\n\n")
wxT("Built with %s and OpenJPEG ") wxT("Built with %s and OpenJPEG ")
wxT(OPENJPEG_VERSION) wxT(OPENJPEG_VERSION)
wxT("\non ") wxT(__DATE__) wxT(", ") wxT(__TIME__) wxT("\non ") wxT(__DATE__) wxT(", ") wxT(__TIME__)
wxT("\nRunning under %s\n\n") wxT("\nRunning under %s\n\n")
OPJ_APPLICATION_COPYRIGHT, OPJ_APPLICATION_COPYRIGHT,
wxVERSION_STRING, wxVERSION_STRING,
wxGetOsDescription().c_str()), wxGetOsDescription().c_str()),
wxT("About ") OPJ_APPLICATION_NAME, wxT("About ") OPJ_APPLICATION_NAME,
wxOK | wxICON_INFORMATION, wxOK | wxICON_INFORMATION,
this this
); );
#endif #endif
} }

View File

@ -1,28 +1,28 @@
/* XPM */ /* XPM */
static char *OPJChild16[] = { static char *OPJChild16[] = {
/* columns rows colors chars-per-pixel */ /* columns rows colors chars-per-pixel */
"16 16 6 1", "16 16 6 1",
" c black", " c black",
". c #008000", ". c #008000",
"X c red", "X c red",
"o c #800080", "o c #800080",
"O c gray100", "O c gray100",
"+ c None", "+ c None",
/* pixels */ /* pixels */
"++++++++++++++++", "++++++++++++++++",
"+OOOOOOOOOOOOOO+", "+OOOOOOOOOOOOOO+",
"+OooooooooooooO+", "+OooooooooooooO+",
"+OooooooooooooO+", "+OooooooooooooO+",
"+OooOOOOOOOOOoO+", "+OooOOOOOOOOOoO+",
"+OooO.......OoO+", "+OooO.......OoO+",
"+OooO.......OoO+", "+OooO.......OoO+",
"+OooO..OOO..OoO+", "+OooO..OOO..OoO+",
"+OooO..OXO..OoO+", "+OooO..OXO..OoO+",
"+OooO..OOO..OoO+", "+OooO..OOO..OoO+",
"+OooO.......OoO+", "+OooO.......OoO+",
"+OooO.......OoO+", "+OooO.......OoO+",
"+OooOOOOOOOOOoO+", "+OooOOOOOOOOOoO+",
"+OooooooooooooO+", "+OooooooooooooO+",
"+OOOOOOOOOOOOOO+", "+OOOOOOOOOOOOOO+",
"++++++++++++++++" "++++++++++++++++"
}; };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
OPJChild16 ICON OPJChild.ico OPJChild16 ICON OPJChild.ico
OPJViewer16 ICON OPJViewer.ico OPJViewer16 ICON OPJViewer.ico
#include "wx/msw/wx.rc" #include "wx/msw/wx.rc"

View File

@ -1,26 +1,26 @@
/* XPM */ /* XPM */
static char *OPJViewer16[] = { static char *OPJViewer16[] = {
/* columns rows colors chars-per-pixel */ /* columns rows colors chars-per-pixel */
"16 16 4 1", "16 16 4 1",
" c black", " c black",
". c #800000", ". c #800000",
"X c red", "X c red",
"o c None", "o c None",
/* pixels */ /* pixels */
"oooooooooooooooo", "oooooooooooooooo",
"ooo.XXXXoooooooo", "ooo.XXXXoooooooo",
"ooXXoo .Xooooooo", "ooXXoo .Xooooooo",
"o..oooo .ooooooo", "o..oooo .ooooooo",
"oX.oooo ooooooo", "oX.oooo ooooooo",
"oX.oooo .ooooooo", "oX.oooo .ooooooo",
"oXXoooo .ooooooo", "oXXoooo .ooooooo",
"o.XXoo .oooooooo", "o.XXoo .oooooooo",
"oo.XXXXooooooooo", "oo.XXXXooooooooo",
"ooooooooo.Xo .oo", "ooooooooo.Xo .oo",
"ooooooooo X. ooo", "ooooooooo X. ooo",
"oooooooooo...ooo", "oooooooooo...ooo",
"oooooooooo XXooo", "oooooooooo XXooo",
"oooooooooo .Xooo", "oooooooooo .Xooo",
"oooooooooooooooo", "oooooooooooooooo",
"oooooooooooooooo" "oooooooooooooooo"
}; };

View File

@ -1,54 +1,54 @@
wxString htmlaboutpage = wxT( wxString htmlaboutpage = wxT(
"<html>" "<html>"
"<body bgcolor=#FFFFFF>" "<body bgcolor=#FFFFFF>"
"<table cellspacing=7 cellpadding=1 border=0 width=100%>" "<table cellspacing=7 cellpadding=1 border=0 width=100%>"
"<tr>" "<tr>"
"<td rowspan=3 valign=top align=center width=70>" "<td rowspan=3 valign=top align=center width=70>"
"<img src=\"memory:opj_logo.xpm\"><br><br>" "<img src=\"memory:opj_logo.xpm\"><br><br>"
"</td>" "</td>"
"<td align=center>" "<td align=center>"
"<font size=+0 color=#000000><b>" "<font size=+0 color=#000000><b>"
OPJ_APPLICATION " " OPJ_APPLICATION_VERSION OPJ_APPLICATION " " OPJ_APPLICATION_VERSION
"</b></font><br>" "</b></font><br>"
"<font size=-1 color=#000000><b>A JPEG 2000 image viewer</b></font><br>" "<font size=-1 color=#000000><b>A JPEG 2000 image viewer</b></font><br>"
"<font size=-2 color=#000000><b>" OPJ_APPLICATION_PLATFORM " version</b></font>" "<font size=-2 color=#000000><b>" OPJ_APPLICATION_PLATFORM " version</b></font>"
"</td>" "</td>"
"</tr>" "</tr>"
"<tr height=3 valign=center>" "<tr height=3 valign=center>"
"<td valign=center bgcolor=#cc3300></td>" "<td valign=center bgcolor=#cc3300></td>"
"</tr>" "</tr>"
"<tr>" "<tr>"
"<td align=justify>" "<td align=justify>"
"<center><font size=+0 color=#000000><a href=\"http://www.openjpeg.org/\">OpenJPEG</a></font></center>" "<center><font size=+0 color=#000000><a href=\"http://www.openjpeg.org/\">OpenJPEG</a></font></center>"
"<p><font size=-1 color=#000000>The OpenJPEG library is an open-source JPEG 2000 codec written in C language. " "<p><font size=-1 color=#000000>The OpenJPEG library is an open-source JPEG 2000 codec written in C language. "
"In addition to the basic codec, various other features are under development.</font></p><br>" "In addition to the basic codec, various other features are under development.</font></p><br>"
"<font size=-2 color=red>* Build: ") "<font size=-2 color=red>* Build: ")
#include "build.h" #include "build.h"
wxT(", " __DATE__ ", " __TIME__ "</font><br>") wxT(", " __DATE__ ", " __TIME__ "</font><br>")
wxT("<font size=-2 color=red>* " wxVERSION_STRING "</font><br>") wxT("<font size=-2 color=red>* " wxVERSION_STRING "</font><br>")
wxT("<font size=-2 color=red>* OpenJPEG " OPENJPEG_VERSION " (") wxT("<font size=-2 color=red>* OpenJPEG " OPENJPEG_VERSION " (")
#ifdef USE_JPWL #ifdef USE_JPWL
wxT("<font size=-2 color=green>JPWL</font> ") wxT("<font size=-2 color=green>JPWL</font> ")
#endif // USE_JPWL #endif // USE_JPWL
#ifdef USE_JPSEC #ifdef USE_JPSEC
wxT("<font size=-2 color=green>JPSEC</font> ") wxT("<font size=-2 color=green>JPSEC</font> ")
#endif // USE_JPSEC #endif // USE_JPSEC
wxT(")</font><br>") wxT(")</font><br>")
#ifdef USE_MXF #ifdef USE_MXF
wxT("<font size=-2 color=red>* MXFLib " MXFLIB_VERSION_MAJOR "." MXFLIB_VERSION_MINOR "." MXFLIB_VERSION_TWEAK " (" MXFLIB_VERSION_BUILD ")</font><br>") wxT("<font size=-2 color=red>* MXFLib " MXFLIB_VERSION_MAJOR "." MXFLIB_VERSION_MINOR "." MXFLIB_VERSION_TWEAK " (" MXFLIB_VERSION_BUILD ")</font><br>")
#endif // USE_MXF #endif // USE_MXF
wxT("</td>" wxT("</td>"
"</tr>" "</tr>"
"<tr>" "<tr>"
"<td colspan=2 bgcolor=#CC3300 height=3 valign=center></td>" "<td colspan=2 bgcolor=#CC3300 height=3 valign=center></td>"
"</tr>" "</tr>"
"<tr>" "<tr>"
"<td colspan=2>" "<td colspan=2>"
"<font size=-2 color=#444444>OpenJPEG is &copy; 2002-2008 <a href=\"http://www.tele.ucl.ac.be/\">TELE</a> - <a href=\"http://www.uclouvain.be/\">Universite' Catholique de Louvain</a></font><br>" "<font size=-2 color=#444444>OpenJPEG is &copy; 2002-2008 <a href=\"http://www.tele.ucl.ac.be/\">TELE</a> - <a href=\"http://www.uclouvain.be/\">Universite' Catholique de Louvain</a></font><br>"
"<font size=-2 color=#444444>OPJViewer is &copy; 2007-2008 <a href=\"http://dsplab.diei.unipg.it/\">DSPLab</a> - <a href=\"http://www.unipg.it/\">Universita' degli studi di Perugia</a></font>" "<font size=-2 color=#444444>OPJViewer is &copy; 2007-2008 <a href=\"http://dsplab.diei.unipg.it/\">DSPLab</a> - <a href=\"http://www.unipg.it/\">Universita' degli studi di Perugia</a></font>"
"</td>" "</td>"
"</tr>" "</tr>"
"</table>" "</table>"
"</body>" "</body>"
"</html>" "</html>"
); );

View File

@ -1 +1 @@
wxT("491") wxT("491")

File diff suppressed because it is too large Load Diff

View File

@ -1,177 +1,177 @@
/* /*
* Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy * Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: imagalljpeg2000.h // Name: imagalljpeg2000.h
// Purpose: wxImage JPEG 2000 family file format handler // Purpose: wxImage JPEG 2000 family file format handler
// Author: G. Baruffa - based on imagjpeg.h, Vaclav Slavik // Author: G. Baruffa - based on imagjpeg.h, Vaclav Slavik
// RCS-ID: $Id: imagalljpeg2000.h,v 0.0 2008/01/31 11:22:00 VZ Exp $ // RCS-ID: $Id: imagalljpeg2000.h,v 0.0 2008/01/31 11:22:00 VZ Exp $
// Copyright: (c) Giuseppe Baruffa // Copyright: (c) Giuseppe Baruffa
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_IMAGJPEG2000_H_ #ifndef _WX_IMAGJPEG2000_H_
#define _WX_IMAGJPEG2000_H_ #define _WX_IMAGJPEG2000_H_
#include "wx/defs.h" #include "wx/defs.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxJPEG2000Handler // wxJPEG2000Handler
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_LIBOPENJPEG #if wxUSE_LIBOPENJPEG
#include "wx/image.h" #include "wx/image.h"
#include "libopenjpeg/openjpeg.h" #include "libopenjpeg/openjpeg.h"
#include "codec/index.h" #include "codec/index.h"
#define wxBITMAP_TYPE_JPEG2000 50 #define wxBITMAP_TYPE_JPEG2000 50
class WXDLLEXPORT wxJPEG2000Handler: public wxImageHandler class WXDLLEXPORT wxJPEG2000Handler: public wxImageHandler
{ {
public: public:
inline wxJPEG2000Handler() inline wxJPEG2000Handler()
{ {
m_name = wxT("JPEG 2000 family file format"); m_name = wxT("JPEG 2000 family file format");
m_extension = wxT("mj2"); m_extension = wxT("mj2");
m_type = wxBITMAP_TYPE_JPEG2000; m_type = wxBITMAP_TYPE_JPEG2000;
m_mime = wxT("image/mj2"); m_mime = wxT("image/mj2");
/* decoding */ /* decoding */
m_reducefactor = 0; m_reducefactor = 0;
m_qualitylayers = 0; m_qualitylayers = 0;
m_components = 0; m_components = 0;
#ifdef USE_JPWL #ifdef USE_JPWL
m_enablejpwl = true; m_enablejpwl = true;
m_expcomps = JPWL_EXPECTED_COMPONENTS; m_expcomps = JPWL_EXPECTED_COMPONENTS;
m_maxtiles = JPWL_MAXIMUM_TILES; m_maxtiles = JPWL_MAXIMUM_TILES;
#endif // USE_JPWL #endif // USE_JPWL
/* encoding */ /* encoding */
m_subsampling = wxT("1,1"); m_subsampling = wxT("1,1");
m_origin = wxT("0,0"); m_origin = wxT("0,0");
m_rates = wxT("20,10,5"); m_rates = wxT("20,10,5");
m_quality = wxT("30,35,40"); m_quality = wxT("30,35,40");
m_enablequality = false; m_enablequality = false;
m_multicomp = false; m_multicomp = false;
m_irreversible = false; m_irreversible = false;
m_resolutions = 6; m_resolutions = 6;
m_progression = 0; m_progression = 0;
m_cbsize = wxT("32,32"); m_cbsize = wxT("32,32");
m_prsize = wxT("[128,128],[128,128]"); m_prsize = wxT("[128,128],[128,128]");
m_tsize = wxT(""); m_tsize = wxT("");
m_torigin = wxT("0,0"); m_torigin = wxT("0,0");
/*m_progression /*m_progression
m_resilience*/ m_resilience*/
m_enablesop = false; m_enablesop = false;
m_enableeph = false; m_enableeph = false;
m_enablereset = false; m_enablereset = false;
m_enablesegmark = false; m_enablesegmark = false;
m_enablevsc = false; m_enablevsc = false;
m_enablerestart = false; m_enablerestart = false;
m_enableerterm = false; m_enableerterm = false;
m_enablebypass = false; m_enablebypass = false;
/*m_roicompo /*m_roicompo
m_roiup m_roiup
m_indexfname*/ m_indexfname*/
m_enableidx = false; m_enableidx = false;
m_index = wxT("index.txt"); m_index = wxT("index.txt");
m_enablepoc = false; m_enablepoc = false;
m_poc = wxT("T1=0,0,1,5,3,CPRL/T1=5,0,1,6,3,CPRL"); m_poc = wxT("T1=0,0,1,5,3,CPRL/T1=5,0,1,6,3,CPRL");
m_enablecomm = true; m_enablecomm = true;
#if defined __WXMSW__ #if defined __WXMSW__
m_comment = wxT("Created by OPJViewer Win32 - OpenJPEG version "); m_comment = wxT("Created by OPJViewer Win32 - OpenJPEG version ");
#elif defined __WXGTK__ #elif defined __WXGTK__
m_comment = wxT("Created by OPJViewer Lin32 - OpenJPEG version "); m_comment = wxT("Created by OPJViewer Lin32 - OpenJPEG version ");
#else #else
m_comment = wxT("Created by OPJViewer - OpenJPEG version "); m_comment = wxT("Created by OPJViewer - OpenJPEG version ");
#endif #endif
#ifdef USE_JPWL #ifdef USE_JPWL
m_comment += wxString::Format(wxT("%s with JPWL"), (char *) opj_version()); m_comment += wxString::Format(wxT("%s with JPWL"), (char *) opj_version());
#else #else
m_comment += wxString::Format(wxT("%s"), (char *) opj_version()); m_comment += wxString::Format(wxT("%s"), (char *) opj_version());
#endif #endif
} }
// decoding engine parameters // decoding engine parameters
int m_reducefactor, m_qualitylayers, m_components, m_framenum; int m_reducefactor, m_qualitylayers, m_components, m_framenum;
#ifdef USE_JPWL #ifdef USE_JPWL
bool m_enablejpwl; bool m_enablejpwl;
int m_expcomps, m_maxtiles; int m_expcomps, m_maxtiles;
#endif // USE_JPWL #endif // USE_JPWL
// encoding engine parameters // encoding engine parameters
wxString m_subsampling; wxString m_subsampling;
wxString m_origin; wxString m_origin;
wxString m_rates; wxString m_rates;
wxString m_quality; wxString m_quality;
bool m_enablequality; bool m_enablequality;
bool m_multicomp; bool m_multicomp;
bool m_irreversible; bool m_irreversible;
int m_resolutions; int m_resolutions;
int m_progression; int m_progression;
wxString m_cbsize; wxString m_cbsize;
wxString m_prsize; wxString m_prsize;
wxString m_tsize; wxString m_tsize;
wxString m_torigin; wxString m_torigin;
/*m_progression /*m_progression
m_resilience*/ m_resilience*/
bool m_enablesop; bool m_enablesop;
bool m_enableeph; bool m_enableeph;
bool m_enablebypass; bool m_enablebypass;
bool m_enableerterm; bool m_enableerterm;
bool m_enablerestart; bool m_enablerestart;
bool m_enablereset; bool m_enablereset;
bool m_enablesegmark; bool m_enablesegmark;
bool m_enablevsc; bool m_enablevsc;
/*m_roicompo /*m_roicompo
m_roiup m_roiup
m_indexfname*/ m_indexfname*/
bool m_enableidx; bool m_enableidx;
wxString m_index; wxString m_index;
bool m_enablecomm; bool m_enablecomm;
wxString m_comment; wxString m_comment;
bool m_enablepoc; bool m_enablepoc;
wxString m_poc; wxString m_poc;
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1); virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1);
virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true); virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true);
protected: protected:
virtual bool DoCanRead(wxInputStream& stream); virtual bool DoCanRead(wxInputStream& stream);
#endif #endif
private: private:
OPJ_PROG_ORDER give_progression(char progression[4]); OPJ_PROG_ORDER give_progression(char progression[4]);
DECLARE_DYNAMIC_CLASS(wxJPEG2000Handler) DECLARE_DYNAMIC_CLASS(wxJPEG2000Handler)
}; };
#endif // wxUSE_LIBOPENJPEG #endif // wxUSE_LIBOPENJPEG
#endif // _WX_IMAGJPEG2000_H_ #endif // _WX_IMAGJPEG2000_H_

File diff suppressed because it is too large Load Diff

View File

@ -1,99 +1,99 @@
/* /*
* Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy * Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: imagmxf.h // Name: imagmxf.h
// Purpose: wxImage MXF (Material eXchange Format) JPEG 2000 file format handler // Purpose: wxImage MXF (Material eXchange Format) JPEG 2000 file format handler
// Author: G. Baruffa - based on imagjpeg.h, Vaclav Slavik // Author: G. Baruffa - based on imagjpeg.h, Vaclav Slavik
// RCS-ID: $Id: imagmj2.h,v 0.0 2007/11/19 17:00:00 VZ Exp $ // RCS-ID: $Id: imagmj2.h,v 0.0 2007/11/19 17:00:00 VZ Exp $
// Copyright: (c) Giuseppe Baruffa // Copyright: (c) Giuseppe Baruffa
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_IMAGMXF_H_ #ifndef _WX_IMAGMXF_H_
#define _WX_IMAGMXF_H_ #define _WX_IMAGMXF_H_
#ifdef USE_MXF #ifdef USE_MXF
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/filename.h" #include "wx/filename.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxMXFHandler // wxMXFHandler
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_LIBOPENJPEG #if wxUSE_LIBOPENJPEG
#include "wx/image.h" #include "wx/image.h"
#include "libopenjpeg/openjpeg.h" #include "libopenjpeg/openjpeg.h"
#define wxBITMAP_TYPE_MXF 51 #define wxBITMAP_TYPE_MXF 51
class WXDLLEXPORT wxMXFHandler: public wxImageHandler class WXDLLEXPORT wxMXFHandler: public wxImageHandler
{ {
public: public:
inline wxMXFHandler() inline wxMXFHandler()
{ {
m_name = wxT("MXF JPEG 2000 file format"); m_name = wxT("MXF JPEG 2000 file format");
m_extension = wxT("mxf"); m_extension = wxT("mxf");
m_type = wxBITMAP_TYPE_MXF; m_type = wxBITMAP_TYPE_MXF;
m_mime = wxT("image/mxf"); m_mime = wxT("image/mxf");
m_reducefactor = 0; m_reducefactor = 0;
m_qualitylayers = 0; m_qualitylayers = 0;
m_components = 0; m_components = 0;
m_filename = wxT(""); m_filename = wxT("");
#ifdef USE_JPWL #ifdef USE_JPWL
m_enablejpwl = true; m_enablejpwl = true;
m_expcomps = JPWL_EXPECTED_COMPONENTS; m_expcomps = JPWL_EXPECTED_COMPONENTS;
m_maxtiles = JPWL_MAXIMUM_TILES; m_maxtiles = JPWL_MAXIMUM_TILES;
#endif // USE_JPWL #endif // USE_JPWL
} }
// decoding engine parameters // decoding engine parameters
int m_reducefactor, m_qualitylayers, m_components, m_framenum; int m_reducefactor, m_qualitylayers, m_components, m_framenum;
wxFileName m_filename; wxFileName m_filename;
#ifdef USE_JPWL #ifdef USE_JPWL
bool m_enablejpwl; bool m_enablejpwl;
int m_expcomps, m_maxtiles; int m_expcomps, m_maxtiles;
#endif // USE_JPWL #endif // USE_JPWL
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected: protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif
private: private:
DECLARE_DYNAMIC_CLASS(wxMXFHandler) DECLARE_DYNAMIC_CLASS(wxMXFHandler)
}; };
#endif // wxUSE_LIBOPENJPEG #endif // wxUSE_LIBOPENJPEG
#endif // USE_MXF #endif // USE_MXF
#endif // _WX_IMAGMXF_H_ #endif // _WX_IMAGMXF_H_

View File

@ -1,14 +1,14 @@
Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
Copyright (c) 2002-2007, Professor Benoit Macq Copyright (c) 2002-2007, Professor Benoit Macq
Copyright (c) 2001-2003, David Janssens Copyright (c) 2001-2003, David Janssens
Copyright (c) 2002-2003, Yannick Verschueren Copyright (c) 2002-2003, Yannick Verschueren
Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
Copyright (c) 2005, Herve Drolon, FreeImage Team Copyright (c) 2005, Herve Drolon, FreeImage Team
Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy Copyright (c) 2007, Digital Signal Processing Laboratory, Università degli studi di Perugia (UPG), Italy
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditionsare met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditionsare met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,34 +1,34 @@
This viewer is conceived to open and display information and image content of J2K, JP2, This viewer is conceived to open and display information and image content of J2K, JP2,
and MJ2 files. and MJ2 files.
The viewer application interface is divided into three main panels: The viewer application interface is divided into three main panels:
- a browsing pane; - a browsing pane;
- a viewing pane; - a viewing pane;
- a log/peek pane. - a log/peek pane.
The browsing pane will present the markers or boxes hierarchy, with position (byte number where marker/box starts and stops) and length information (i.e., inner length as signalled by marker/box and total length, with marker/box sign included), in the following form: The browsing pane will present the markers or boxes hierarchy, with position (byte number where marker/box starts and stops) and length information (i.e., inner length as signalled by marker/box and total length, with marker/box sign included), in the following form:
filename filename
| |
|_ #000: Marker/Box short name (Hex code) |_ #000: Marker/Box short name (Hex code)
| | | |
| |_ *** Marker/Box long name *** | |_ *** Marker/Box long name ***
| |_ startbyte > stopbyte, inner_length + marker/box sign length (total length) | |_ startbyte > stopbyte, inner_length + marker/box sign length (total length)
| |_ Additional info, depending on the marker/box type | |_ Additional info, depending on the marker/box type
| |_ ... | |_ ...
| |
|_ #001: Marker/Box short name (Hex code) |_ #001: Marker/Box short name (Hex code)
| | | |
| |_ ... | |_ ...
| |
... ...
The viewing pane will display the decoded image contained in the JPEG 2000 file. The viewing pane will display the decoded image contained in the JPEG 2000 file.
It should display correctly images as large as 4000x2000, provided that a couple of GB of RAM are available. Nothing is known about the display of larger sizes: let us know if you manage to get it working. It should display correctly images as large as 4000x2000, provided that a couple of GB of RAM are available. Nothing is known about the display of larger sizes: let us know if you manage to get it working.
The log/peek pane is shared among two different subpanels: The log/peek pane is shared among two different subpanels:
- the log panel will report a lot of debugging info coming out from the wx GUI as well as from the openjpeg library - the log panel will report a lot of debugging info coming out from the wx GUI as well as from the openjpeg library
- the peek pane tries to give a peek on the codestream/file portion which is currently selected in the browsing pane. It shows both hex and ascii values corresponding to the marker/box section. - the peek pane tries to give a peek on the codestream/file portion which is currently selected in the browsing pane. It shows both hex and ascii values corresponding to the marker/box section.

View File

@ -1,11 +1,11 @@
What is OpenJPEG ? What is OpenJPEG ?
================== ==================
The OpenJPEG library is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, the new still-image compression standard from the Joint Photographic Experts Group (JPEG). In addition to the basic codec, various other features are under development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool useful for the JPIP protocol, JPWL-tools for error-resilience, a Java-viewer for j2k-images, ... The OpenJPEG library is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, the new still-image compression standard from the Joint Photographic Experts Group (JPEG). In addition to the basic codec, various other features are under development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool useful for the JPIP protocol, JPWL-tools for error-resilience, a Java-viewer for j2k-images, ...
Who can use the library ? Who can use the library ?
========================= =========================
Anybody. As the OpenJPEG library is released under the BSD license, anybody can use or modify the library, even for commercial applications. The only restriction is to retain the copyright in the sources or the binaries documentation. Anybody. As the OpenJPEG library is released under the BSD license, anybody can use or modify the library, even for commercial applications. The only restriction is to retain the copyright in the sources or the binaries documentation.
Who is developing the library ? Who is developing the library ?
=============================== ===============================
The library is developed by the Communications and Remote Sensing Lab (TELE), in the Université Catholique de Louvain (UCL). The JPWL module is developped and maintained by the Digital Signal Processing Lab (DSPLab) of the University of Perugia, Italy (UNIPG). As our purpose is to make OpenJPEG really useful for those interested in the image compression field, any feedback/advices are obviously welcome ! We will do our best to handle them quickly. The library is developed by the Communications and Remote Sensing Lab (TELE), in the Université Catholique de Louvain (UCL). The JPWL module is developped and maintained by the Digital Signal Processing Lab (DSPLab) of the University of Perugia, Italy (UNIPG). As our purpose is to make OpenJPEG really useful for those interested in the image compression field, any feedback/advices are obviously welcome ! We will do our best to handle them quickly.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff