summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-11-13 14:21:02 -0500
committerThiago Macieira <thiago.macieira@intel.com>2014-02-12 22:46:28 +0100
commitfd22bee22274975c56f1c10d87ee9fd2c0818f83 (patch)
tree157b21221e0d8233df59850d4e4f3537fb601240
parent80592b0e7145fb876ea0e84a6e3dadfd5f7481b6 (diff)
Remove JPEG 2000 plugin.
It is moving to the QtImageFormats module. Change-Id: I1b7e05e01852ce51e93189d5fb04af9c89f0c807 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--qtjp2imageformat/INSTALL.TXT254
-rw-r--r--qtjp2imageformat/README.TXT70
-rwxr-xr-xqtjp2imageformat/configure25
-rw-r--r--qtjp2imageformat/configure.bat80
-rw-r--r--qtjp2imageformat/doc/html/classic.css284
-rw-r--r--qtjp2imageformat/doc/html/images/qt-logo.pngbin4075 -> 0 bytes
-rw-r--r--qtjp2imageformat/doc/html/index.html50
-rw-r--r--qtjp2imageformat/doc/html/qjpeg2plugin-members.html79
-rw-r--r--qtjp2imageformat/doc/html/qjpeg2plugin.html64
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imageformat-example-simple.html91
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imageformat.dcf32
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imageformat.index55
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imageformat.qhp46
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imagehandler-members.html53
-rw-r--r--qtjp2imageformat/doc/html/qtjp2imagehandler.html101
-rw-r--r--qtjp2imageformat/doc/images/qt-logo.pngbin4075 -> 0 bytes
-rw-r--r--qtjp2imageformat/doc/index.qdoc89
-rw-r--r--qtjp2imageformat/examples/examples.pro2
-rw-r--r--qtjp2imageformat/examples/simple/logo.jp2bin27570 -> 0 bytes
-rw-r--r--qtjp2imageformat/examples/simple/simple.cpp68
-rw-r--r--qtjp2imageformat/examples/simple/simple.pro12
-rw-r--r--qtjp2imageformat/examples/simple/simple.qdoc51
-rw-r--r--qtjp2imageformat/examples/simple/simple.qrc5
-rw-r--r--qtjp2imageformat/plugin/plugin.pro17
-rw-r--r--qtjp2imageformat/plugin/qtjp2imageformatplugin.cpp93
-rw-r--r--qtjp2imageformat/plugin/qtjp2imageformatplugin.h53
-rw-r--r--qtjp2imageformat/qtjp2imageformat.pro4
-rw-r--r--qtjp2imageformat/src/qtjp2imageformat.pri37
-rw-r--r--qtjp2imageformat/src/qtjp2imagehandler.cpp1180
-rw-r--r--qtjp2imageformat/src/qtjp2imagehandler.h66
30 files changed, 0 insertions, 2961 deletions
diff --git a/qtjp2imageformat/INSTALL.TXT b/qtjp2imageformat/INSTALL.TXT
deleted file mode 100644
index bbb74a9..0000000
--- a/qtjp2imageformat/INSTALL.TXT
+++ /dev/null
@@ -1,254 +0,0 @@
-INSTALLATION INSTRUCTIONS
-
-These instructions refer to the package you are installing as
-some-package.tar.gz or some-package.zip. The .zip file is intended for use
-on Windows.
-
-The directory you choose for the installation will be referred to as
-your-install-dir.
-
-Note to Qt Visual Studio Integration users: In the instructions below,
-instead of building from command line with nmake, you can use the menu
-command 'Qt->Open Solution from .pro file' on the .pro files in the
-example and plugin directories, and then build from within Visual
-Studio.
-
-Unpacking and installation
---------------------------
-
-1. Unpacking the archive (if you have not done so already).
-
- On Unix and Mac OS X (in a terminal window):
-
- cd your-install-dir
- gunzip some-package.tar.gz
- tar xvf some-package.tar
-
- This creates the subdirectory some-package containing the files.
-
- On Windows:
-
- Unpack the .zip archive by right-clicking it in explorer and
- choosing "Extract All...". If your version of Windows does not
- have zip support, you can use the infozip tools available
- from www.info-zip.org.
-
- If you are using the infozip tools (in a command prompt window):
- cd your-install-dir
- unzip some-package.zip
-
-2. Configuring the package.
-
- The configure script is called "configure" on unix/mac and
- "configure.bat" on Windows. It should be run from a command line
- after cd'ing to the package directory.
-
- You can choose whether you want to use the component by including
- its source code directly into your project, or build the component
- as a dynamic shared library (DLL) that is loaded into the
- application at run-time. The latter may be preferable for
- technical or licensing (LGPL) reasons. If you want to build a DLL,
- run the configure script with the argument "-library". Also see
- the note about usage below.
-
- (Components that are Qt plugins, e.g. styles and image formats,
- are by default built as a plugin DLL.)
-
- The configure script will prompt you in some cases for further
- information. Answer these questions and carefully read the license text
- before accepting the license conditions. The package cannot be used if
- you do not accept the license conditions.
-
-3. Building the component and examples (when required).
-
- If a DLL is to be built, or if you would like to build the
- examples, next give the commands
-
- qmake
- make [or nmake if your are using Microsoft Visual C++]
-
- The example program(s) can be found in the directory called
- "examples" or "example".
-
- Components that are Qt plugins, e.g. styles and image formats, are
- ready to be used as soon as they are built, so the rest of this
- installation instruction can be skipped.
-
-4. Building the Qt Designer plugin (optional).
-
- Some of the widget components are provided with plugins for Qt
- Designer. To build and install the plugin, cd into the
- some-package/plugin directory and give the commands
-
- qmake
- make [or nmake if your are using Microsoft Visual C++]
-
- Restart Qt Designer to make it load the new widget plugin.
-
- Note: If you are using the built-in Qt Designer from the Qt Visual
- Studio Integration, you will need to manually copy the plugin DLL
- file, i.e. copy
- %QTDIR%\plugins\designer\some-component.dll
- to the Qt Visual Studio Integration plugin path, typically:
- C:\Program Files\Trolltech\Qt VS Integration\plugins
-
- Note: If you for some reason are using a Qt Designer that is built
- in debug mode, you will need to build the plugin in debug mode
- also. Edit the file plugin.pro in the plugin directory, changing
- 'release' to 'debug' in the CONFIG line, before running qmake.
-
-
-
-Solutions components are intended to be used directly from the package
-directory during development, so there is no 'make install' procedure.
-
-
-Using a component in your project
----------------------------------
-
-To use this component in your project, add the following line to the
-project's .pro file (or do the equivalent in your IDE):
-
- include(your-install-dir/some-package/src/some-package.pri)
-
-This adds the package's sources and headers to the SOURCES and HEADERS
-project variables respectively (or, if the component has been
-configured as a DLL, it adds that library to the LIBS variable), and
-updates INCLUDEPATH to contain the package's src
-directory. Additionally, the .pri file may include some dependencies
-needed by the package.
-
-To include a header file from the package in your sources, you can now
-simply use:
-
- #include <SomeClass>
-
-or alternatively, in pre-Qt 4 style:
-
- #include <some-class.h>
-
-Refer to the documentation to see the classes and headers this
-components provides.
-
-
-
-Install documentation (optional)
---------------------------------
-
-The HTML documentation for the package's classes is located in the
-your-install-dir/some-package/doc/html/index.html. You can open this
-file and read the documentation with any web browser.
-
-To install the documentation into Qt Assistant (for Qt version 4.4 and
-later):
-
-1. In Assistant, open the Edit->Preferences dialog and choose the
- Documentation tab. Click the Add... button and select the file
- your-install-dir/some-package/doc/html/some-package.qch
-
-For Qt versions prior to 4.4, do instead the following:
-
-1. The directory your-install-dir/some-package/doc/html contains a
- file called some-package.dcf. Execute the following commands in a
- shell, command prompt or terminal window:
-
- cd your-install-dir/some-package/doc/html/
- assistant -addContentFile some-package.dcf
-
-The next time you start Qt Assistant, you can access the package's
-documentation.
-
-
-Removing the documentation from assistant
------------------------------------------
-
-If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later:
-
-1. In Assistant, open the Edit->Preferences dialog and choose the
- Documentation tab. In the list of Registered Documentation, select
- the item com.nokia.qtsolutions.some-package_version, and click
- the Remove button.
-
-For Qt versions prior to 4.4, do instead the following:
-
-1. The directory your-install-dir/some-package/doc/html contains a
- file called some-package.dcf. Execute the following commands in a
- shell, command prompt or terminal window:
-
- cd your-install-dir/some-package/doc/html/
- assistant -removeContentFile some-package.dcf
-
-
-
-Using the component as a DLL
-----------------------------
-
-1. Normal components
-
- The shared library (DLL) is built and placed in the
- some-package/lib directory. It is intended to be used directly
- from there during development. When appropriate, both debug and
- release versions are built, since the run-time linker will in some
- cases refuse to load a debug-built DLL into a release-built
- application or vice versa.
-
- The following steps are taken by default to help the dynamic
- linker to locate the DLL at run-time (during development):
-
- Unix: The some-package.pri file will add linker instructions to
- add the some-package/lib directory to the rpath of the
- executable. (When distributing, or if your system does not support
- rpath, you can copy the shared library to another place that is
- searched by the dynamic linker, e.g. the "lib" directory of your
- Qt installation.)
-
- Mac: The full path to the library is hardcoded into the library
- itself, from where it is copied into the executable at link time,
- and ready by the dynamic linker at run-time. (When distributing,
- you will want to edit these hardcoded paths in the same way as for
- the Qt DLLs. Refer to the document "Deploying an Application on
- Mac OS X" in the Qt Reference Documentation.)
-
- Windows: the .dll file(s) are copied into the "bin" directory of
- your Qt installation. The Qt installation will already have set up
- that directory to be searched by the dynamic linker.
-
-
-2. Plugins
-
- For Qt Solutions plugins (e.g. image formats), both debug and
- release versions of the plugin are built by default when
- appropriate, since in some cases the release Qt library will not
- load a debug plugin, and vice versa. The plugins are automatically
- copied into the plugins directory of your Qt installation when
- built, so no further setup is required.
-
- Plugins may also be built statically, i.e. as a library that will be
- linked into your application executable, and so will not need to
- be redistributed as a separate plugin DLL to end users. Static
- building is required if Qt itself is built statically. To do it,
- just add "static" to the CONFIG variable in the plugin/plugin.pro
- file before building. Refer to the "Static Plugins" section in the
- chapter "How to Create Qt Plugins" for explanation of how to use a
- static plugin in your application. The source code of the example
- program(s) will also typically contain the relevant instructions
- as comments.
-
-
-
-Uninstalling
-------------
-
- The following command will remove any fils that have been
- automatically placed outside the package directory itself during
- installation and building
-
- make distclean [or nmake if your are using Microsoft Visual C++]
-
- If Qt Assistant documentation or Qt Designer plugins have been
- installed, they can be uninstalled manually, ref. above.
-
-
-Enjoy! :)
-
-- The Qt Solutions Team.
diff --git a/qtjp2imageformat/README.TXT b/qtjp2imageformat/README.TXT
deleted file mode 100644
index 079ad58..0000000
--- a/qtjp2imageformat/README.TXT
+++ /dev/null
@@ -1,70 +0,0 @@
-Qt Solutions Component: JPEG 2000 Image Format
-
-The JPEG 2000 Image Format provides a QImageIOHandler plugin for
-reading and writing JPEG 2000 files.
-
-This QImageIOHandler plugin adds support for the JPEG 2000 image
-file format to Qt. Currently, it is only availabe as a dynamically
-loaded plugin. We have plans to add support for statically linked
-plugins later. JPEG 2000 is designed to produce better compression
-and less quality loss than ordinary JPEG. QtJp2ImageHandler uses
-the free, Open Source codec JasPer, which is an official reference
-implementation of the JPEG 2000 Part-1 codec standard.
-
-Notes:
-
-The JPEG 2000 image format provides support for storing image data
-in several color spaces (such as RGB or YCrBr). In addition
-high-precision image data is supported. The Qt JPEG 2000 reader
-supports loading such images, but the image data will be converted
-to RGB(A) with 8 bits of precicion per component when stored in a
-QImage.
-
-The JasPer library can be downloaded from
-http://www.ece.uvic.ca/~mdadams/jasper/. Packages exist for many
-linux distributions. It can also be installed on Windows.
-
-Windows build notes:
-
-If you are on Windows, you need to change the JASPERINCLUDE and
-JASPERLIB settings in src\qtjp2imageformat.pri to point to the
-JasPer header files and the jasper library. Inside the JasPer
-library package the header files are located at
-src\libjasper\include\jasper. (Note that Qt JPEG 2000 #include's
-the header files as "jasper\xxxx.h")
-
-The library itself can be built with src\msvc\libjasper.dsw.
-Before building the library it is neceasary to change the run-time
-library settings to reflect the settings used when building your
-Qt application. This is typically done by adding a switch like /MD
-for release and /MDd for debug in the project options. This
-setting is found in the Project Properties dialog, under "C/C++ ->
-Code Generation -> Runtime Library". (See
-http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp
-for a description of possible run-time library settings).
-
-Note that if you only want to use JasPer for the Qt JPEG 2000
-Solution, you do not need to build all the 5 jasper projects. Only
-the "libjasper" project needs to be built. This also means that
-you do not need to install the GLUT and/or IJG libraries, as the
-JasPer documentation explains.
-
-The library will be built as src\msvc\Win32_Debug\libjasper.lib or
-src\msvc\Win32_Release\libjasper.lib, depending on if it is a
-debug or release build.
-
-Version history:
-
-2.0: - Latest version ported to Qt 4.0
-
-2.1: - QImageReader::imageFormat() now returns the correct format
- string.
-
-2.2: - Various build and documentation issues fixed.
- - Updated to latest Jasper version: 1.900.1.
-
-2.3: - Misc. minor fixes.
- - LGPL release.
-
-2.4: - Build fix.
-
diff --git a/qtjp2imageformat/configure b/qtjp2imageformat/configure
deleted file mode 100755
index 3c4edff..0000000
--- a/qtjp2imageformat/configure
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-if [ "x$1" != "x" -a "x$1" != "x-library" ]; then
- echo "Usage: $0 [-library]"
- echo
- echo "-library: Build the component as a dynamic library (DLL). Default is to"
- echo " include the component source code directly in the application."
- echo
- exit 0
-fi
-
-rm -f config.pri
-if [ "x$1" = "x-library" ]; then
- echo "Configuring to build this component as a dynamic library."
- echo "SOLUTIONS_LIBRARY = yes" > config.pri
-fi
-
-echo
-echo "This component is now configured."
-echo
-echo "To build the component library (if requested) and example(s),"
-echo "run qmake and your make command."
-echo
-echo "To remove or reconfigure, run make distclean."
-echo
diff --git a/qtjp2imageformat/configure.bat b/qtjp2imageformat/configure.bat
deleted file mode 100644
index 69efec3..0000000
--- a/qtjp2imageformat/configure.bat
+++ /dev/null
@@ -1,80 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-:: Contact: http://www.qt-project.org/legal
-::
-:: This file is part of the Qt Solutions component.
-::
-:: $QT_BEGIN_LICENSE:BSD$
-:: You may use this file under the terms of the BSD license as follows:
-::
-:: "Redistribution and use in source and binary forms, with or without
-:: modification, are permitted provided that the following conditions are
-:: met:
-:: * Redistributions of source code must retain the above copyright
-:: notice, this list of conditions and the following disclaimer.
-:: * 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.
-:: * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-:: of its contributors may be used to endorse or promote products derived
-:: from this software without specific prior written permission.
-::
-::
-:: 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."
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-@echo off
-
-rem
-rem "Main"
-rem
-
-if not "%1"=="" (
- if not "%1"=="-library" (
- call :PrintUsage
- goto EOF
- )
-)
-
-if exist config.pri. del config.pri
-if "%1"=="-library" (
- echo Configuring to build this component as a dynamic library.
- echo SOLUTIONS_LIBRARY = yes > config.pri
-)
-
-echo .
-echo This component is now configured.
-echo .
-echo To build the component library (if requested) and example(s),
-echo run qmake and your make or nmake command.
-echo .
-echo To remove or reconfigure, run make (nmake) distclean.
-echo .
-goto EOF
-
-:PrintUsage
-echo Usage: configure.bat [-library]
-echo .
-echo -library: Build the component as a dynamic library (DLL). Default is to
-echo include the component source directly in the application.
-echo A DLL may be preferable for technical or licensing (LGPL) reasons.
-echo .
-goto EOF
-
-
-:EOF
diff --git a/qtjp2imageformat/doc/html/classic.css b/qtjp2imageformat/doc/html/classic.css
deleted file mode 100644
index b8cae8e..0000000
--- a/qtjp2imageformat/doc/html/classic.css
+++ /dev/null
@@ -1,284 +0,0 @@
-BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
- font-family: Arial, Geneva, Helvetica, sans-serif;
-}
-H1 {
- text-align: center;
- font-size: 160%;
-}
-H2 {
- font-size: 120%;
-}
-H3 {
- font-size: 100%;
-}
-
-h3.fn,span.fn
-{
- background-color: #eee;
- border-width: 1px;
- border-style: solid;
- border-color: #ddd;
- font-weight: bold;
- padding: 6px 0px 6px 10px;
- margin: 42px 0px 0px 0px;
-}
-
-hr {
- border: 0;
- color: #a0a0a0;
- background-color: #ccc;
- height: 1px;
- width: 100%;
- text-align: left;
- margin: 34px 0px 34px 0px;
-}
-
-table.valuelist {
- border-width: 1px 1px 1px 1px;
- border-style: solid;
- border-color: #dddddd;
- border-collapse: collapse;
- background-color: #f0f0f0;
-}
-
-table.indextable {
- border-width: 1px 1px 1px 1px;
- border-style: solid;
- border-collapse: collapse;
- background-color: #f0f0f0;
- border-color:#555;
- font-size: 100%;
-}
-
-table td.largeindex {
- border-width: 1px 1px 1px 1px;
- border-collapse: collapse;
- background-color: #f0f0f0;
- border-color:#555;
- font-size: 120%;
-}
-
-table.valuelist th {
- border-width: 1px 1px 1px 2px;
- padding: 4px;
- border-style: solid;
- border-color: #666;
- color:white;
- background-color:#666;
-}
-
-th.titleheader {
- border-width: 1px 0px 1px 0px;
- padding: 2px;
- border-style: solid;
- border-color: #666;
- color:white;
- background-color:#555;
- background-image:url('images/gradient.png')};
- background-repeat: repeat-x;
- font-size: 100%;
-}
-
-
-th.largeheader {
- border-width: 1px 0px 1px 0px;
- padding: 4px;
- border-style: solid;
- border-color: #444;
- color:white;
- background-color:#555555;
- font-size: 120%;
-}
-
-p {
-
- margin-left: 4px;
- margin-top: 8px;
- margin-bottom: 8px;
-}
-
-a:link
-{
- color: #0046ad;
- text-decoration: none
-}
-
-a:visited
-{
- color: #672967;
- text-decoration: none
-}
-
-a.obsolete
-{
- color: #661100;
- text-decoration: none
-}
-
-a.compat
-{
- color: #661100;
- text-decoration: none
-}
-
-a.obsolete:visited
-{
- color: #995500;
- text-decoration: none
-}
-
-a.compat:visited
-{
- color: #995500;
- text-decoration: none
-}
-
-body
-{
- background: #ffffff;
- color: black
-}
-
-table.generic, table.annotated
-{
- border-width: 1px;
- border-color:#bbb;
- border-style:solid;
- border-collapse:collapse;
-}
-
-table td.memItemLeft {
- width: 180px;
- padding: 2px 0px 0px 8px;
- margin: 4px;
- border-width: 1px;
- border-color: #E0E0E0;
- border-style: none;
- font-size: 100%;
- white-space: nowrap
-}
-
-table td.memItemRight {
- padding: 2px 8px 0px 8px;
- margin: 4px;
- border-width: 1px;
- border-color: #E0E0E0;
- border-style: none;
- font-size: 100%;
-}
-
-table tr.odd {
- background: #f0f0f0;
- color: black;
-}
-
-table tr.even {
- background: #e4e4e4;
- color: black;
-}
-
-table.annotated th {
- padding: 3px;
- text-align: left
-}
-
-table.annotated td {
- padding: 3px;
-}
-
-table tr pre
-{
- padding-top: 0px;
- padding-bottom: 0px;
- padding-left: 0px;
- padding-right: 0px;
- border: none;
- background: none
-}
-
-tr.qt-style
-{
- background: #96E066;
- color: black
-}
-
-body pre
-{
- padding: 0.2em;
- border: #e7e7e7 1px solid;
- background: #f1f1f1;
- color: black
-}
-
-table tr.qt-code pre
-{
- padding: 0.2em;
- border: #e7e7e7 1px solid;
- background: #f1f1f1;
- color: black
-}
-
-span.preprocessor, span.preprocessor a
-{
- color: darkblue;
-}
-
-span.comment
-{
- color: darkred;
- font-style: italic
-}
-
-span.string,span.char
-{
- color: darkgreen;
-}
-
-.title
-{
- text-align: center
-}
-
-.subtitle
-{
- font-size: 0.8em
-}
-
-.small-subtitle
-{
- font-size: 0.65em
-}
-
-.qmlitem {
- padding: 0;
-}
-
-.qmlname {
- white-space: nowrap;
-}
-
-.qmltype {
- text-align: center;
- font-size: 160%;
-}
-
-.qmlproto {
- background-color: #eee;
- border-width: 1px;
- border-style: solid;
- border-color: #ddd;
- font-weight: bold;
- padding: 6px 10px 6px 10px;
- margin: 42px 0px 0px 0px;
-}
-
-.qmlreadonly {
- float: right;
- color: red
-}
-
-.qmldoc {
-}
-
-*.qmlitem p {
-}
diff --git a/qtjp2imageformat/doc/html/images/qt-logo.png b/qtjp2imageformat/doc/html/images/qt-logo.png
deleted file mode 100644
index 794162f..0000000
--- a/qtjp2imageformat/doc/html/images/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/qtjp2imageformat/doc/html/index.html b/qtjp2imageformat/doc/html/index.html
deleted file mode 100644
index 2714537..0000000
--- a/qtjp2imageformat/doc/html/index.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- index.qdoc -->
-<head>
- <title>JPEG 2000 Image Format</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">JPEG 2000 Image Format<br /><span class="subtitle"></span>
-</h1>
-<a name="description"></a>
-<h2>Description</h2>
-<p>The JPEG 2000 Image Format provides a <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html">QImageIOHandler</a> plugin for reading and writing JPEG 2000 files.</p>
-<p>This <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html">QImageIOHandler</a> plugin adds support for the JPEG 2000 image file format to Qt. Currently, it is only availabe as a dynamically loaded plugin. We have plans to add support for statically linked plugins later. JPEG 2000 is designed to produce better compression and less quality loss than ordinary JPEG. QtJp2ImageHandler uses the free, Open Source codec JasPer, which is an official reference implementation of the JPEG 2000 Part-1 codec standard.</p>
-<a name="classes"></a>
-<h2>Classes</h2>
-<ul>
-<li><a href="qtjp2imagehandler.html">QtJP2ImageHandler</a></li>
-<li><a href="qjpeg2plugin.html">QJPeg2Plugin</a></li>
-</ul>
-<a name="examples"></a>
-<h2>Examples</h2>
-<ul>
-<li><a href="qtjp2imageformat-example-simple.html">Using the QPixmap API to load JPEG 2000 images</a></li>
-</ul>
-<a name="tested-platforms"></a>
-<h2>Tested platforms</h2>
-<ul>
-<li>Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005</li>
-<li>Qt 4.4, 4.5 / Linux / gcc</li>
-<li>Qt 4.4, 4.5 / MacOS X 10.5 / gcc</li>
-</ul>
-<a name="unsupported-platforms"></a>
-<h2>Unsupported platforms</h2>
-<ul>
-<li>Does not work with Jasper 1.900.0</li>
-</ul>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/html/qjpeg2plugin-members.html b/qtjp2imageformat/doc/html/qjpeg2plugin-members.html
deleted file mode 100644
index 9c38f0a..0000000
--- a/qtjp2imageformat/doc/html/qjpeg2plugin-members.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- qtjp2imageformatplugin.cpp -->
-<head>
- <title>List of All Members for QJPeg2Plugin</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">List of All Members for QJPeg2Plugin</h1>
-<p>This is the complete list of members for <a href="qjpeg2plugin.html">QJPeg2Plugin</a>, including inherited members.</p>
-<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr><td width="45%" valign="top"><ul>
-<li><div class="fn">typedef <b><a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#Capabilities-typedef">Capabilities</a></b></div></li>
-<li><div class="fn">enum <b><a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#Capability-enum">Capability</a></b></div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#blockSignals">blockSignals</a></b> ( bool )</div></li>
-<li><div class="fn"><b><a href="qjpeg2plugin.html#capabilities">capabilities</a></b> ( QIODevice *, const QByteArray &amp; ) const : Capabilities</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#childEvent">childEvent</a></b> ( QChildEvent * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#children">children</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#connect">connect</a></b> ( const QObject *, const char *, const QObject *, const char *, Qt::ConnectionType )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#connect-2">connect</a></b> ( const QObject *, const char *, const char *, Qt::ConnectionType ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#connectNotify">connectNotify</a></b> ( const char * )</div></li>
-<li><div class="fn"><b><a href="qjpeg2plugin.html#create">create</a></b> ( QIODevice *, const QByteArray &amp; ) const : QImageIOHandler *</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#customEvent">customEvent</a></b> ( QEvent * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#d_ptr-var">d_ptr</a></b> : </div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#deleteLater">deleteLater</a></b> ()</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#destroyed">destroyed</a></b> ( QObject * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#disconnect">disconnect</a></b> ( const QObject *, const char *, const QObject *, const char * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#disconnect-2">disconnect</a></b> ( const char *, const QObject *, const char * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#disconnect-3">disconnect</a></b> ( const QObject *, const char * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#disconnectNotify">disconnectNotify</a></b> ( const char * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#dumpObjectInfo">dumpObjectInfo</a></b> ()</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#dumpObjectTree">dumpObjectTree</a></b> ()</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#dynamicPropertyNames">dynamicPropertyNames</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#event">event</a></b> ( QEvent * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#eventFilter">eventFilter</a></b> ( QObject *, QEvent * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#findChild">findChild</a></b> ( const QString &amp; ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#findChildren">findChildren</a></b> ( const QString &amp; ) const</div></li>
-</ul></td><td valign="top"><ul>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#findChildren-2">findChildren</a></b> ( const QRegExp &amp; ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#inherits">inherits</a></b> ( const char * ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#installEventFilter">installEventFilter</a></b> ( QObject * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#isWidgetType">isWidgetType</a></b> () const</div></li>
-<li><div class="fn"><b><a href="qjpeg2plugin.html#keys">keys</a></b> () const : QStringList</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#killTimer">killTimer</a></b> ( int )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#metaObject">metaObject</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#moveToThread">moveToThread</a></b> ( QThread * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#objectName-prop">objectName</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#parent">parent</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#property">property</a></b> ( const char * ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#receivers">receivers</a></b> ( const char * ) const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#removeEventFilter">removeEventFilter</a></b> ( QObject * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#sender">sender</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#objectName-prop">setObjectName</a></b> ( const QString &amp; )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#setParent">setParent</a></b> ( QObject * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#setProperty">setProperty</a></b> ( const char *, const QVariant &amp; )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#signalsBlocked">signalsBlocked</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#startTimer">startTimer</a></b> ( int )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#staticMetaObject-var">staticMetaObject</a></b> : </div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#staticQtMetaObject-var">staticQtMetaObject</a></b> : </div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#thread">thread</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#timerEvent">timerEvent</a></b> ( QTimerEvent * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#tr">tr</a></b> ( const char *, const char *, int )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qobject.html#trUtf8">trUtf8</a></b> ( const char *, const char *, int )</div></li>
-</ul>
-</td></tr>
-</table></p>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/html/qjpeg2plugin.html b/qtjp2imageformat/doc/html/qjpeg2plugin.html
deleted file mode 100644
index 9414935..0000000
--- a/qtjp2imageformat/doc/html/qjpeg2plugin.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- qtjp2imageformatplugin.cpp -->
-<head>
- <title>QJPeg2Plugin Class Reference</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">QJPeg2Plugin Class Reference</h1>
-<p>This class implements the <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html">QImageIOPlugin</a> inteface for the <tt>JPEG</tt> 2000 image format. <a href="#details">More...</a></p>
-<pre> #include &lt;QJPeg2Plugin&gt;</pre><p>Inherits <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html">QImageIOPlugin</a>.</p>
-<ul>
-<li><a href="qjpeg2plugin-members.html">List of all members, including inherited members</a></li>
-</ul>
-<hr />
-<a name="reimplemented-public-functions"></a>
-<h2>Reimplemented Public Functions</h2>
-<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr><td class="memItemLeft" align="right" valign="top">virtual Capabilities </td><td class="memItemRight" valign="bottom"><b><a href="qjpeg2plugin.html#capabilities">capabilities</a></b> ( QIODevice * <i>device</i>, const QByteArray &amp; <i>format</i> ) const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual QImageIOHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qjpeg2plugin.html#create">create</a></b> ( QIODevice * <i>device</i>, const QByteArray &amp; <i>format</i> = QByteArray() ) const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qjpeg2plugin.html#keys">keys</a></b> () const</td></tr>
-</table>
-<ul>
-<li><div bar="2" class="fn"></div>3 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#public-functions">QImageIOPlugin</a></li>
-<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-functions">QObject</a></li>
-</ul>
-<h3>Additional Inherited Members</h3>
-<ul>
-<li><div class="fn"></div>1 property inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#properties">QObject</a></li>
-<li><div class="fn"></div>3 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#public-functions">QImageIOPlugin</a></li>
-<li><div class="fn"></div>29 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-functions">QObject</a></li>
-<li><div class="fn"></div>1 public slot inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-slots">QObject</a></li>
-<li><div class="fn"></div>1 signal inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#signals">QObject</a></li>
-<li><div class="fn"></div>1 public type inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-variables">QObject</a></li>
-<li><div class="fn"></div>4 static public members inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#static-public-members">QObject</a></li>
-<li><div class="fn"></div>7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#protected-functions">QObject</a></li>
-<li><div class="fn"></div>2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#protected-variables">QObject</a></li>
-</ul>
-<a name="details"></a>
-<hr />
-<h2>Detailed Description</h2>
-<p>This class implements the <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html">QImageIOPlugin</a> inteface for the <tt>JPEG</tt> 2000 image format.</p>
-<hr />
-<h2>Member Function Documentation</h2>
-<h3 class="fn"><a name="capabilities"></a><a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#Capabilities-typedef">Capabilities</a> QJPeg2Plugin::capabilities ( <a href="http://qt.nokia.com/doc/4.6/qiodevice.html">QIODevice</a> * <i>device</i>, const <a href="http://qt.nokia.com/doc/4.6/qbytearray.html">QByteArray</a> &amp; <i>format</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#capabilities">QImageIOPlugin::capabilities</a>().</p>
-<h3 class="fn"><a name="create"></a><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html">QImageIOHandler</a> * QJPeg2Plugin::create ( <a href="http://qt.nokia.com/doc/4.6/qiodevice.html">QIODevice</a> * <i>device</i>, const <a href="http://qt.nokia.com/doc/4.6/qbytearray.html">QByteArray</a> &amp; <i>format</i> = QByteArray() ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#create">QImageIOPlugin::create</a>().</p>
-<h3 class="fn"><a name="keys"></a><a href="http://qt.nokia.com/doc/4.6/qstringlist.html">QStringList</a> QJPeg2Plugin::keys () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageioplugin.html#keys">QImageIOPlugin::keys</a>().</p>
-<p>Returns a <a href="http://qt.nokia.com/doc/4.6/qstringlist.html">QStringList</a> containing the values &quot;jp2&quot; and &quot;j2k&quot;.</p>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/html/qtjp2imageformat-example-simple.html b/qtjp2imageformat/doc/html/qtjp2imageformat-example-simple.html
deleted file mode 100644
index 82c34cf..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imageformat-example-simple.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- simple.qdoc -->
-<head>
- <title>A simple JPEG 2000 Image Format example.</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">A simple JPEG 2000 Image Format example.<br /><span class="subtitle"></span>
-</h1>
-<a name="introduction"></a>
-<h2>Introduction</h2>
-<p>This example demonstrates how to use the standard <a href="http://qt.nokia.com/doc/4.6/qpixmap.html">QPixmap</a> API to load a JPEG 2000 image. Be sure to install the plugin before running this example.</p>
-<pre><span class="comment"> /****************************************************************************
- **
- ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the Qt Solutions component.
- **
- ** You may use this file under the terms of the BSD license as follows:
- **
- ** &quot;Redistribution and use in source and binary forms, with or without
- ** modification, are permitted provided that the following conditions are
- ** met:
- ** * Redistributions of source code must retain the above copyright
- ** notice, this list of conditions and the following disclaimer.
- ** * 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.
- ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
- ** the names of its contributors may be used to endorse or promote
- ** products derived from this software without specific prior written
- ** permission.
- **
- ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ** &quot;AS IS&quot; 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.&quot;
- **
- ****************************************************************************/</span>
-
- #include &lt;QtGui/QApplication&gt;
- #include &lt;QtGui/QImage&gt;
- #include &lt;QtGui/QLabel&gt;
- #include &lt;QtGui/QPixmap&gt;
-
-<span class="comment"> // If the plugin is built statically, uncomment the following two lines</span>
-<span class="comment"> //#include &lt;QtCore/QtPlugin&gt;</span>
-<span class="comment"> //Q_IMPORT_PLUGIN(qtjp2)</span>
-
- int main(int argc, char *argv[])
- {
- QApplication app(argc, argv);
-<span class="comment"> /*
- The plugin must be installed in $(QTDIR)/plugins/imageformats in order for this
- example to work.
- See the QImageIO documementation for further info.
- */</span>
- QLabel imageLabel(0);
- QPixmap pixmap;
-
- if(!pixmap.load(&quot;:/logo.jp2&quot;))
- imageLabel.setText(&quot;Could not load image&quot;);
- else
- imageLabel.setPixmap(pixmap);
-
- imageLabel.show();
- return app.exec();
- }</pre>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/html/qtjp2imageformat.dcf b/qtjp2imageformat/doc/html/qtjp2imageformat.dcf
deleted file mode 100644
index 8da6d60..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imageformat.dcf
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE DCF>
-<DCF ref="index.html" icon="qtjp2imageformat.png" imagedir="../../gif" title="Qt Solutions: JPEG 2000 Image Format Documentation">
-<section ref="classes.html" title="Classes">
- <section ref="qjpeg2plugin.html" title="QJPeg2Plugin Class Reference">
- <keyword ref="qjpeg2plugin.html">QJPeg2Plugin</keyword>
- <keyword ref="qjpeg2plugin.html#capabilities">capabilities</keyword>
- <keyword ref="qjpeg2plugin.html#create">create</keyword>
- <keyword ref="qjpeg2plugin.html#keys">keys</keyword>
- <section ref="qjpeg2plugin-members.html" title="List of all members"/>
- </section>
- <section ref="qtjp2imagehandler.html" title="QtJP2ImageHandler Class Reference">
- <keyword ref="qtjp2imagehandler.html">QtJP2ImageHandler</keyword>
- <keyword ref="qtjp2imagehandler.html#canRead">canRead</keyword>
- <keyword ref="qtjp2imagehandler.html#name">name</keyword>
- <keyword ref="qtjp2imagehandler.html#option">option</keyword>
- <keyword ref="qtjp2imagehandler.html#read">read</keyword>
- <keyword ref="qtjp2imagehandler.html#setOption">setOption</keyword>
- <keyword ref="qtjp2imagehandler.html#supportsOption">supportsOption</keyword>
- <keyword ref="qtjp2imagehandler.html#write">write</keyword>
- <section ref="qtjp2imagehandler-members.html" title="List of all members"/>
- </section>
-</section>
-<section ref="overviews.html" title="Overviews">
- <section ref="qtjp2imageformat-example-simple.html" title="A simple JPEG 2000 Image Format example.">
- <keyword ref="qtjp2imageformat-example-simple.html">A simple JPEG 2000 Image Format example.</keyword>
- </section>
- <section ref="index.html" title="JPEG 2000 Image Format">
- <keyword ref="index.html">JPEG 2000 Image Format</keyword>
- </section>
-</section>
-<section ref="examples.html" title="Tutorial &amp; Examples"/>
-</DCF>
diff --git a/qtjp2imageformat/doc/html/qtjp2imageformat.index b/qtjp2imageformat/doc/html/qtjp2imageformat.index
deleted file mode 100644
index 5f3d9a6..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imageformat.index
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE QDOCINDEX>
-<INDEX url="" title="Qt Solutions: JPEG 2000 Image Format Documentation" version="">
- <namespace access="public" threadsafety="unspecified" status="commendable" name="" href="" location="" module="">
- <class access="public" threadsafety="unspecified" status="commendable" name="QtJP2ImageHandler" href="qtjp2imagehandler.html" location="qtjp2imagehandler.h" bases="QImageIOHandler" module="">
- <function access="public" threadsafety="unspecified" status="commendable" name="QtJP2ImageHandler" fullname="QtJP2ImageHandler::QtJP2ImageHandler" href="qtjp2imagehandler.html#QtJP2ImageHandler" location="qtjp2imagehandler.h" virtual="non" meta="constructor" const="false" static="false" overload="false" type="" signature="QtJP2ImageHandler(QIODevice * device)">
- <parameter left="QIODevice *" right="" name="device" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="~QtJP2ImageHandler" fullname="QtJP2ImageHandler::~QtJP2ImageHandler" href="qtjp2imagehandler.html#dtor.QtJP2ImageHandler" location="qtjp2imagehandler.h" virtual="impure" meta="destructor" const="false" static="false" overload="false" type="" signature="~QtJP2ImageHandler()"/>
- <function access="public" threadsafety="unspecified" status="commendable" name="canRead" fullname="QtJP2ImageHandler::canRead" href="qtjp2imagehandler.html#canRead" location="qtjp2imagehandler.h" virtual="non" meta="plain" const="false" static="true" overload="false" type="bool" signature="canRead(QIODevice * iod, QByteArray * subType)">
- <parameter left="QIODevice *" right="" name="iod" default=""/>
- <parameter left="QByteArray *" right="" name="subType" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="canRead" fullname="QtJP2ImageHandler::canRead" href="qtjp2imagehandler.html#canRead-2" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="true" static="false" overload="true" overload-number="2" type="bool" signature="canRead() const"/>
- <function access="public" threadsafety="unspecified" status="commendable" name="read" fullname="QtJP2ImageHandler::read" href="qtjp2imagehandler.html#read" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="false" static="false" overload="false" type="bool" signature="read(QImage * image)">
- <parameter left="QImage *" right="" name="image" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="write" fullname="QtJP2ImageHandler::write" href="qtjp2imagehandler.html#write" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="false" static="false" overload="false" type="bool" signature="write(const QImage &amp; image)">
- <parameter left="const QImage &amp;" right="" name="image" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="option" fullname="QtJP2ImageHandler::option" href="qtjp2imagehandler.html#option" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="QVariant" signature="option(ImageOption option) const">
- <parameter left="ImageOption" right="" name="option" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="setOption" fullname="QtJP2ImageHandler::setOption" href="qtjp2imagehandler.html#setOption" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="false" static="false" overload="false" type="void" signature="setOption(ImageOption option, const QVariant &amp; value)">
- <parameter left="ImageOption" right="" name="option" default=""/>
- <parameter left="const QVariant &amp;" right="" name="value" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="supportsOption" fullname="QtJP2ImageHandler::supportsOption" href="qtjp2imagehandler.html#supportsOption" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="bool" signature="supportsOption(ImageOption option) const">
- <parameter left="ImageOption" right="" name="option" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="name" fullname="QtJP2ImageHandler::name" href="qtjp2imagehandler.html#name" location="qtjp2imagehandler.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="QByteArray" signature="name() const"/>
- </class>
- <class access="public" threadsafety="unspecified" status="commendable" name="QJPeg2Plugin" href="qjpeg2plugin.html" location="qtjp2imageformatplugin.h" bases="QImageIOPlugin" module="">
- <function access="public" threadsafety="unspecified" status="commendable" name="keys" fullname="QJPeg2Plugin::keys" href="qjpeg2plugin.html#keys" location="qtjp2imageformatplugin.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="QStringList" signature="keys() const"/>
- <function access="public" threadsafety="unspecified" status="commendable" name="capabilities" fullname="QJPeg2Plugin::capabilities" href="qjpeg2plugin.html#capabilities" location="qtjp2imageformatplugin.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="Capabilities" signature="capabilities(QIODevice * device, const QByteArray &amp; format) const">
- <parameter left="QIODevice *" right="" name="device" default=""/>
- <parameter left="const QByteArray &amp;" right="" name="format" default=""/>
- </function>
- <function access="public" threadsafety="unspecified" status="commendable" name="create" fullname="QJPeg2Plugin::create" href="qjpeg2plugin.html#create" location="qtjp2imageformatplugin.h" virtual="impure" meta="plain" const="true" static="false" overload="false" type="QImageIOHandler *" signature="create(QIODevice * device, const QByteArray &amp; format) const">
- <parameter left="QIODevice *" right="" name="device" default=""/>
- <parameter left="const QByteArray &amp;" right="" name="format" default="QByteArray()"/>
- </function>
- </class>
- <page access="public" status="commendable" name="index.html" href="index.html" subtype="page" title="JPEG 2000 Image Format" fulltitle="JPEG 2000 Image Format" subtitle="" location="index.qdoc">
- <contents name="description" title="Description" level="1"/>
- <contents name="classes" title="Classes" level="1"/>
- <contents name="examples" title="Examples" level="1"/>
- <contents name="tested-platforms" title="Tested platforms" level="1"/>
- <contents name="unsupported-platforms" title="Unsupported platforms" level="1"/>
- </page>
- <page access="public" status="commendable" name="qtjp2imageformat-example-simple.html" href="qtjp2imageformat-example-simple.html" subtype="page" title="A simple JPEG 2000 Image Format example." fulltitle="A simple JPEG 2000 Image Format example." subtitle="" location="simple.qdoc">
- <contents name="introduction" title="Introduction" level="1"/>
- </page>
- </namespace>
-</INDEX>
diff --git a/qtjp2imageformat/doc/html/qtjp2imageformat.qhp b/qtjp2imageformat/doc/html/qtjp2imageformat.qhp
deleted file mode 100644
index da6e7be..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imageformat.qhp
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<QtHelpProject version="1.0">
- <namespace>com.nokia.qtsolutions.qtjp2imageformat_head</namespace>
- <virtualFolder>qdoc</virtualFolder>
- <customFilter name="Qt Solutions: JPEG 2000 Image Format">
- <filterAttribute>qtjp2imageformat</filterAttribute>
- <filterAttribute>qt</filterAttribute>
- <filterAttribute>solutions</filterAttribute>
- </customFilter>
- <filterSection>
- <filterAttribute>qtjp2imageformat</filterAttribute>
- <filterAttribute>qt</filterAttribute>
- <filterAttribute>solutions</filterAttribute>
- <toc>
- <section ref="index.html" title="Qt Solutions: JPEG 2000 Image Format Documentation">
- <section ref="qtjp2imageformat-example-simple.html" title="A simple JPEG 2000 Image Format example."/>
- <section ref="index.html" title="JPEG 2000 Image Format"/>
- </section>
- </toc>
- <keywords>
- <keyword name="A simple JPEG 2000 Image Format example." id="A simple JPEG 2000 Image Format example." ref="qtjp2imageformat-example-simple.html"/>
- <keyword name="JPEG 2000 Image Format" id="JPEG 2000 Image Format" ref="index.html"/>
- <keyword name="QJPeg2Plugin" id="QJPeg2Plugin" ref="qjpeg2plugin.html"/>
- <keyword name="capabilities" id="QJPeg2Plugin::capabilities" ref="qjpeg2plugin.html#capabilities"/>
- <keyword name="create" id="QJPeg2Plugin::create" ref="qjpeg2plugin.html#create"/>
- <keyword name="keys" id="QJPeg2Plugin::keys" ref="qjpeg2plugin.html#keys"/>
- <keyword name="QtJP2ImageHandler" id="QtJP2ImageHandler" ref="qtjp2imagehandler.html"/>
- <keyword name="canRead" id="QtJP2ImageHandler::canRead" ref="qtjp2imagehandler.html#canRead"/>
- <keyword name="name" id="QtJP2ImageHandler::name" ref="qtjp2imagehandler.html#name"/>
- <keyword name="option" id="QtJP2ImageHandler::option" ref="qtjp2imagehandler.html#option"/>
- <keyword name="read" id="QtJP2ImageHandler::read" ref="qtjp2imagehandler.html#read"/>
- <keyword name="setOption" id="QtJP2ImageHandler::setOption" ref="qtjp2imagehandler.html#setOption"/>
- <keyword name="supportsOption" id="QtJP2ImageHandler::supportsOption" ref="qtjp2imagehandler.html#supportsOption"/>
- <keyword name="write" id="QtJP2ImageHandler::write" ref="qtjp2imagehandler.html#write"/>
- <keyword name="~QtJP2ImageHandler" id="QtJP2ImageHandler::~QtJP2ImageHandler" ref="qtjp2imagehandler.html#dtor.QtJP2ImageHandler"/>
- </keywords>
- <files>
- <file>index.html</file>
- <file>qjpeg2plugin.html</file>
- <file>qtjp2imageformat-example-simple.html</file>
- <file>qtjp2imagehandler.html</file>
- <file>classic.css</file>
- <file>images/qt-logo.png</file>
- </files>
- </filterSection>
-</QtHelpProject>
diff --git a/qtjp2imageformat/doc/html/qtjp2imagehandler-members.html b/qtjp2imageformat/doc/html/qtjp2imagehandler-members.html
deleted file mode 100644
index dda8f3a..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imagehandler-members.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- qtjp2imagehandler.cpp -->
-<head>
- <title>List of All Members for QtJP2ImageHandler</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">List of All Members for QtJP2ImageHandler</h1>
-<p>This is the complete list of members for <a href="qtjp2imagehandler.html">QtJP2ImageHandler</a>, including inherited members.</p>
-<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr><td width="45%" valign="top"><ul>
-<li><div class="fn">enum <b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">ImageOption</a></b></div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#QtJP2ImageHandler">QtJP2ImageHandler</a></b> ( QIODevice * )</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#dtor.QtJP2ImageHandler">~QtJP2ImageHandler</a></b> ()</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#canRead">canRead</a></b> ( QIODevice *, QByteArray * ) : bool</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#canRead-2">canRead</a></b> () const : bool</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#currentImageNumber">currentImageNumber</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#currentImageRect">currentImageRect</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#d_ptr-var">d_ptr</a></b> : </div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#device">device</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#format">format</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#imageCount">imageCount</a></b> () const</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#jumpToImage">jumpToImage</a></b> ( int )</div></li>
-</ul></td><td valign="top"><ul>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#jumpToNextImage">jumpToNextImage</a></b> ()</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#loopCount">loopCount</a></b> () const</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#name">name</a></b> () const : QByteArray</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#nextImageDelay">nextImageDelay</a></b> () const</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#option">option</a></b> ( ImageOption ) const : QVariant</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#read">read</a></b> ( QImage * ) : bool</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#setDevice">setDevice</a></b> ( QIODevice * )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#setFormat">setFormat</a></b> ( const QByteArray &amp; )</div></li>
-<li><div class="fn"><b><a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#setFormat-2">setFormat</a></b> ( const QByteArray &amp; ) const</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#setOption">setOption</a></b> ( ImageOption, const QVariant &amp; )</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#supportsOption">supportsOption</a></b> ( ImageOption ) const : bool</div></li>
-<li><div class="fn"><b><a href="qtjp2imagehandler.html#write">write</a></b> ( const QImage &amp; ) : bool</div></li>
-</ul>
-</td></tr>
-</table></p>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/html/qtjp2imagehandler.html b/qtjp2imageformat/doc/html/qtjp2imagehandler.html
deleted file mode 100644
index 74e2f19..0000000
--- a/qtjp2imageformat/doc/html/qtjp2imagehandler.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<!-- qtjp2imagehandler.cpp -->
-<head>
- <title>QtJP2ImageHandler Class Reference</title>
- <link href="classic.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
-<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
-</tr></table><h1 class="title">QtJP2ImageHandler Class Reference</h1>
-<p>The QtJP2ImageHandler class provides support for reading and writing JPEG 2000 image files with Qts plugin system. Currently, it only supports dynamically-loaded plugins. <a href="#details">More...</a></p>
-<pre> #include &lt;QtJP2ImageHandler&gt;</pre><p>Inherits <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html">QImageIOHandler</a>.</p>
-<ul>
-<li><a href="qtjp2imagehandler-members.html">List of all members, including inherited members</a></li>
-</ul>
-<hr />
-<a name="public-functions"></a>
-<h2>Public Functions</h2>
-<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#QtJP2ImageHandler">QtJP2ImageHandler</a></b> ( QIODevice * <i>device</i> )</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#dtor.QtJP2ImageHandler">~QtJP2ImageHandler</a></b> ()</td></tr>
-</table>
-<hr />
-<a name="reimplemented-public-functions"></a>
-<h2>Reimplemented Public Functions</h2>
-<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#canRead-2">canRead</a></b> () const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#name">name</a></b> () const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#option">option</a></b> ( ImageOption <i>option</i> ) const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#read">read</a></b> ( QImage * <i>image</i> )</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#setOption">setOption</a></b> ( ImageOption <i>option</i>, const QVariant &amp; <i>value</i> )</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#supportsOption">supportsOption</a></b> ( ImageOption <i>option</i> ) const</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#write">write</a></b> ( const QImage &amp; <i>image</i> )</td></tr>
-</table>
-<ul>
-<li><div bar="2" class="fn"></div>18 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#public-functions">QImageIOHandler</a></li>
-</ul>
-<hr />
-<a name="static-public-members"></a>
-<h2>Static Public Members</h2>
-<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtjp2imagehandler.html#canRead">canRead</a></b> ( QIODevice * <i>iod</i>, QByteArray * <i>subType</i> )</td></tr>
-</table>
-<h3>Additional Inherited Members</h3>
-<ul>
-<li><div class="fn"></div>1 protected type inherited from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#protected-variables">QImageIOHandler</a></li>
-</ul>
-<a name="details"></a>
-<hr />
-<h2>Detailed Description</h2>
-<p>The QtJP2ImageHandler class provides support for reading and writing JPEG 2000 image files with Qts plugin system. Currently, it only supports dynamically-loaded plugins.</p>
-<p>JPEG files comes in two subtypes: the JPEG 2000 file format (<tt>.jp2</tt>) and the JPEG 2000 code stream format (<tt>.j2k</tt>, <tt>.jpc</tt>, or <tt>.j2c</tt>). QtJP2ImageHandler can read and write both types.</p>
-<p>To select a subtype, use the <a href="qtjp2imagehandler.html#setOption">setOption</a>() function with the <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">QImageIOHandler::SubType</a> option and a parameter value of &quot;jp2&quot; or &quot;j2k&quot;.</p>
-<p>To set the image quality when writing, you can use <a href="qtjp2imagehandler.html#setOption">setOption</a>() with the <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">QImageIOHandler::Quality</a> option, or <a href="http://qt.nokia.com/doc/4.6/qimagewriter.html#setQuality">QImageWriter::setQuality</a>() if your are using a <a href="http://qt.nokia.com/doc/4.6/qimagewriter.html">QImageWriter</a> object to write the image. The Image quality is specified as an int in the range 0 to 100. 0 means maximum compression and 99 means minimum compression. 100 selects lossless encoding, and this is the default value.</p>
-<p>The JPEG handler is only available as a plugin, and this enables you to use normal <a href="http://qt.nokia.com/doc/4.6/qimage.html">QImage</a> and <a href="http://qt.nokia.com/doc/4.6/qpixmap.html">QPixmap</a> functions to read and write images. For example:</p>
-<pre> myLabel-&gt;setPixmap(QPixmap(&quot;myimage.jp2&quot;));
-
- QPixmap myPixmap;
- myPixmap.save(&quot;myimage.jp2&quot;, &quot;JP2&quot;);</pre>
-<hr />
-<h2>Member Function Documentation</h2>
-<h3 class="fn"><a name="QtJP2ImageHandler"></a>QtJP2ImageHandler::QtJP2ImageHandler ( <a href="http://qt.nokia.com/doc/4.6/qiodevice.html">QIODevice</a> * <i>device</i> )</h3>
-<p>Constructs an instance of <a href="qtjp2imagehandler.html">QtJP2ImageHandler</a> initialized to use <i>device</i>.</p>
-<h3 class="fn"><a name="dtor.QtJP2ImageHandler"></a>QtJP2ImageHandler::~QtJP2ImageHandler ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Desctructor for <a href="qtjp2imagehandler.html">QtJP2ImageHandler</a>.</p>
-<h3 class="fn"><a name="canRead"></a>bool QtJP2ImageHandler::canRead ( <a href="http://qt.nokia.com/doc/4.6/qiodevice.html">QIODevice</a> * <i>iod</i>, <a href="http://qt.nokia.com/doc/4.6/qbytearray.html">QByteArray</a> * <i>subType</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
-<p>Verifies if some values (magic bytes) are set as expected in the header of the file. If the magic bytes were found, we assume that we can read the file. The function will assume that the <i>iod</i> is pointing to the beginning of the JPEG 2000 header. (i.e&#x2e; it will for instance not seek to the beginning of a file before reading).</p>
-<p>If <i>subType</i> is not 0, it will contain &quot;jp2&quot; or &quot;j2k&quot; upon successful return.</p>
-<h3 class="fn"><a name="canRead-2"></a>bool QtJP2ImageHandler::canRead () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#canRead">QImageIOHandler::canRead</a>().</p>
-<h3 class="fn"><a name="name"></a><a href="http://qt.nokia.com/doc/4.6/qbytearray.html">QByteArray</a> QtJP2ImageHandler::name () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler-obsolete.html#name" class="obsolete">QImageIOHandler::name</a>().</p>
-<p>Return the common identifier of the format. For JPEG 2000 this will return &quot;jp2&quot;.</p>
-<h3 class="fn"><a name="option"></a><a href="http://qt.nokia.com/doc/4.6/qvariant.html">QVariant</a> QtJP2ImageHandler::option ( <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">ImageOption</a> <i>option</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#option">QImageIOHandler::option</a>().</p>
-<p>Get the value associated with <i>option</i>.</p>
-<p>See also <a href="qtjp2imagehandler.html#setOption">setOption</a>().</p>
-<h3 class="fn"><a name="read"></a>bool QtJP2ImageHandler::read ( <a href="http://qt.nokia.com/doc/4.6/qimage.html">QImage</a> * <i>image</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#read">QImageIOHandler::read</a>().</p>
-<h3 class="fn"><a name="setOption"></a>void QtJP2ImageHandler::setOption ( <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">ImageOption</a> <i>option</i>, const <a href="http://qt.nokia.com/doc/4.6/qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#setOption">QImageIOHandler::setOption</a>().</p>
-<p>The JPEG 2000 handler supports two options. Set <i>option</i> to <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">QImageIOHandler::Quality</a> to balance between quality and the compression level, where <i>value</i> should be an integer in the interval [0-100]. 0 is maximum compression (low quality) and 100 is lossless compression (high quality).</p>
-<p>Set <i>option</i> to QImageIOHandler::Subtype to choose the subtype, where <i>value</i> should be a string equal to either &quot;jp2&quot; or &quot;j2k&quot;</p>
-<p>See also <a href="qtjp2imagehandler.html#option">option</a>().</p>
-<h3 class="fn"><a name="supportsOption"></a>bool QtJP2ImageHandler::supportsOption ( <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">ImageOption</a> <i>option</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#supportsOption">QImageIOHandler::supportsOption</a>().</p>
-<p>This function will return true if <i>option</i> is set to either <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#ImageOption-enum">QImageIOHandler::Quality</a> or QImageIOHandler::Subtype.</p>
-<h3 class="fn"><a name="write"></a>bool QtJP2ImageHandler::write ( const <a href="http://qt.nokia.com/doc/4.6/qimage.html">QImage</a> &amp; <i>image</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
-<p>Reimplemented from <a href="http://qt.nokia.com/doc/4.6/qimageiohandler.html#write">QImageIOHandler::write</a>().</p>
-<p /><address><hr /><div align="center">
-<table width="100%" cellspacing="0" border="0"><tr class="address">
-<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
-<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
-<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
-</tr></table></div></address></body>
-</html>
diff --git a/qtjp2imageformat/doc/images/qt-logo.png b/qtjp2imageformat/doc/images/qt-logo.png
deleted file mode 100644
index 794162f..0000000
--- a/qtjp2imageformat/doc/images/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/qtjp2imageformat/doc/index.qdoc b/qtjp2imageformat/doc/index.qdoc
deleted file mode 100644
index b99ebe6..0000000
--- a/qtjp2imageformat/doc/index.qdoc
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page index.html
- \title JPEG 2000 Image Format
-
- \section1 Description
-
- The JPEG 2000 Image Format provides a QImageIOHandler plugin for
- reading and writing JPEG 2000 files.
-
-
-
- This QImageIOHandler plugin adds support for the JPEG 2000
- image file format to Qt. Currently, it is only availabe as a dynamically loaded plugin.
- We have plans to add support for statically linked plugins later.
- JPEG 2000 is designed to produce better
- compression and less quality loss than ordinary JPEG. QtJp2ImageHandler
- uses the free, Open Source codec JasPer, which is an official
- reference implementation of the JPEG 2000 Part-1 codec standard.
-
-
-
- \section1 Classes
- \list
- \i QtJP2ImageHandler \i QJPeg2Plugin\endlist
-
- \section1 Examples
- \list
- \i \link qtjp2imageformat-example-simple.html Using the QPixmap API to load JPEG 2000 images \endlink \endlist
-
-
-
-
-
-
- \section1 Tested platforms
- \list
- \i Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005
- \i Qt 4.4, 4.5 / Linux / gcc
- \i Qt 4.4, 4.5 / MacOS X 10.5 / gcc
- \endlist
-
-
- \section1 Unsupported platforms
- \list
- \i Does not work with Jasper 1.900.0
- \endlist
-
-
-*/
diff --git a/qtjp2imageformat/examples/examples.pro b/qtjp2imageformat/examples/examples.pro
deleted file mode 100644
index 69e2b3f..0000000
--- a/qtjp2imageformat/examples/examples.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE=subdirs
-SUBDIRS=simple
diff --git a/qtjp2imageformat/examples/simple/logo.jp2 b/qtjp2imageformat/examples/simple/logo.jp2
deleted file mode 100644
index f99343d..0000000
--- a/qtjp2imageformat/examples/simple/logo.jp2
+++ /dev/null
Binary files differ
diff --git a/qtjp2imageformat/examples/simple/simple.cpp b/qtjp2imageformat/examples/simple/simple.cpp
deleted file mode 100644
index 8cd647e..0000000
--- a/qtjp2imageformat/examples/simple/simple.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include <QImage>
-#include <QLabel>
-#include <QPixmap>
-
-// If the plugin is built statically, uncomment the following two lines
-//#include <QtPlugin>
-//Q_IMPORT_PLUGIN(qtjp2)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-/*
- The plugin must be installed in $(QTDIR)/plugins/imageformats in order for this
- example to work.
- See the QImageIO documementation for further info.
-*/
- QLabel imageLabel(0);
- QPixmap pixmap;
-
- if(!pixmap.load(":/logo.jp2"))
- imageLabel.setText("Could not load image");
- else
- imageLabel.setPixmap(pixmap);
-
- imageLabel.show();
- return app.exec();
-}
diff --git a/qtjp2imageformat/examples/simple/simple.pro b/qtjp2imageformat/examples/simple/simple.pro
deleted file mode 100644
index 171ac66..0000000
--- a/qtjp2imageformat/examples/simple/simple.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-INCLUDEPATH += .
-
-SOURCES += simple.cpp
-
-RESOURCES = simple.qrc
-
-CONFIG += qt warn_on thread create_prl link_prl console
-
-# If the plugin is built statically, uncomment the following line.
-# (If the jasper libs are not in a system path, also add -L<jasper-libdir> )
-#LIBS += -L$$[QT_INSTALL_PLUGINS]/imageformats -lqtjp2 -ljasper
diff --git a/qtjp2imageformat/examples/simple/simple.qdoc b/qtjp2imageformat/examples/simple/simple.qdoc
deleted file mode 100644
index 7619816..0000000
--- a/qtjp2imageformat/examples/simple/simple.qdoc
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtjp2imageformat-example-simple.html
- \title A simple JPEG 2000 Image Format example.
-
- \section1 Introduction
- This example demonstrates how to use the standard QPixmap API
- to load a JPEG 2000 image. Be sure to install the plugin before
- running this example.
-
- \quotefile simple.cpp
-*/
diff --git a/qtjp2imageformat/examples/simple/simple.qrc b/qtjp2imageformat/examples/simple/simple.qrc
deleted file mode 100644
index 3dfb5c5..0000000
--- a/qtjp2imageformat/examples/simple/simple.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>logo.jp2</file>
-</qresource>
-</RCC>
diff --git a/qtjp2imageformat/plugin/plugin.pro b/qtjp2imageformat/plugin/plugin.pro
deleted file mode 100644
index 41fee13..0000000
--- a/qtjp2imageformat/plugin/plugin.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-# To build the plugin statically, uncomment the following line
-#CONFIG += static
-
-TEMPLATE = lib
-CONFIG += qt plugin
-win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
-TARGET = qtjp2
-VERSION = 2.3.0
-
-TARGET = $$qtLibraryTarget($$TARGET)
-DESTDIR = $$[QT_INSTALL_PLUGINS]/imageformats
-
-include(../src/qtjp2imageformat.pri)
-SOURCES += qtjp2imageformatplugin.cpp
-
-target.path += $$[QT_INSTALL_PLUGINS]/imageformats
-INSTALLS += target
diff --git a/qtjp2imageformat/plugin/qtjp2imageformatplugin.cpp b/qtjp2imageformat/plugin/qtjp2imageformatplugin.cpp
deleted file mode 100644
index f210c2f..0000000
--- a/qtjp2imageformat/plugin/qtjp2imageformatplugin.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT_NO_IMAGEFORMATPLUGIN
-#include <QImageIOHandler>
-#include <QStringList>
-
-#include "qtjp2imageformatplugin.h"
-#include "qtjp2imagehandler.h"
-
-/*!
- \class QJPeg2Plugin
-
- \brief This class implements the QImageIOPlugin inteface for the \c
- JPEG 2000 image format.
-*/
-
-/*!
- Returns a QStringList containing the values "jp2" and "j2k".
-*/
-QStringList QJPeg2Plugin::keys() const
-{
- return QStringList() << "jp2" << "j2k";
-}
-
-/*! \reimp
-*/
-QJPeg2Plugin::Capabilities QJPeg2Plugin::capabilities(QIODevice *device, const QByteArray &format) const
-{
- if (format == "jp2" || format == "j2k")
- return Capabilities(CanRead | CanWrite);
- if (!format.isEmpty())
- return 0;
- if (!device->isOpen())
- return 0;
-
- Capabilities cap;
- if (device->isReadable() && QtJP2ImageHandler::canRead(device, 0))
- cap |= CanRead;
- if (device->isWritable())
- cap |= CanWrite;
- return cap;
-}
-/*! \reimp
-*/
-QImageIOHandler *QJPeg2Plugin::create(QIODevice *device, const QByteArray &format) const
-{
- QImageIOHandler *handler = new QtJP2ImageHandler(device);
-
- handler->setFormat(format);
- return handler;
-}
-
-Q_EXPORT_PLUGIN2(qtjp2, QJPeg2Plugin)
-#endif
-
diff --git a/qtjp2imageformat/plugin/qtjp2imageformatplugin.h b/qtjp2imageformat/plugin/qtjp2imageformatplugin.h
deleted file mode 100644
index a334e8b..0000000
--- a/qtjp2imageformat/plugin/qtjp2imageformatplugin.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTJP2IMAGEFORMATPLUGIN_H
-#define QTJP2IMAGEFORMATPLUGIN_H
-#include <QImageIOPlugin>
-
-class QJPeg2Plugin : public QImageIOPlugin
-{
-public:
- QStringList keys() const;
- Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
- QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const;
-};
-
-#endif
diff --git a/qtjp2imageformat/qtjp2imageformat.pro b/qtjp2imageformat/qtjp2imageformat.pro
deleted file mode 100644
index 3b2ab97..0000000
--- a/qtjp2imageformat/qtjp2imageformat.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE=subdirs
-CONFIG += ordered
-include(common.pri)
-SUBDIRS+=plugin examples
diff --git a/qtjp2imageformat/src/qtjp2imageformat.pri b/qtjp2imageformat/src/qtjp2imageformat.pri
deleted file mode 100644
index 6ed0c21..0000000
--- a/qtjp2imageformat/src/qtjp2imageformat.pri
+++ /dev/null
@@ -1,37 +0,0 @@
-INCLUDEPATH += $$PWD
-HEADERS+= $$PWD/qtjp2imagehandler.h
-SOURCES+= $$PWD/qtjp2imagehandler.cpp
-unix: LIBS += -ljasper
-
-win32 {
-#
-# Insert the path to JasPer (see README.TXT) below, for instance like this:
-#
-# JASPERINCLUDE = c:/JasPer/jasper-1.900.1/src/libjasper/include
-# CONFIG(debug, debug|release): {
-# JASPERLIB = c:/JasPer/jasper-1.900.1/src/msvc/win32_debug
-# } else {
-# JASPERLIB = c:/JasPer/jasper-1.900.1/src/msvc/win32_release
-# }
-
-
-JASPERINCLUDE = #Enter include path here
-CONFIG(debug, debug|release): {
- JASPERLIB = #Enter debug library path here
-} else {
- JASPERLIB = #Enter release library path here
-}
-
-
-!exists($$JASPERINCLUDE/jasper/jasper.h) {
- error("JasPer header files not found, please set JASPERINCLUDE in src/qtjp2imageformat.pri")
-}
-!exists($$JASPERLIB/libjasper.lib) {
- error("JasPer lib file not found, please set JASPERLIB in src/qtjp2imageformat.pri")
-}
-
-INCLUDEPATH +=$$JASPERINCLUDE
-LIBS += -L$$JASPERLIB
-LIBS += libjasper.lib
-
-}
diff --git a/qtjp2imageformat/src/qtjp2imagehandler.cpp b/qtjp2imageformat/src/qtjp2imagehandler.cpp
deleted file mode 100644
index ea9d85c..0000000
--- a/qtjp2imageformat/src/qtjp2imagehandler.cpp
+++ /dev/null
@@ -1,1180 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qtjp2imagehandler.h"
-#include <QImage>
-#include <QStringList>
-#include <QString>
-#include <QColor>
-#include <QFile>
-#include <QIODevice>
-#include <QImageIOHandler>
-#include <QVariant>
-
-#ifdef Q_CC_MSVC
- #define JAS_WIN_MSVC_BUILD
-#endif
-#include <jasper/jasper.h>
-
-enum SubFormat { Jp2Format, J2kFormat };
-
-/*
- \class Jpeg2000JasperReader
- \brief Jpeg2000JasperReader implements reading and writing of JPEG 2000 image files.
-
- \internal
-
- This class is designed to be used together with the an QImageIO IOHandler, and
- it should probably not be neccesary to instanciate it directly.
-
- Internally it used the Jasper library for coding the image data.
-*/
-class Jpeg2000JasperReader {
-public:
- Jpeg2000JasperReader(QIODevice *iod, const SubFormat format = Jp2Format);
-
- ~Jpeg2000JasperReader();
-
- bool read(QImage *pImage);
- bool write(const QImage &image, int quality);
-private:
- typedef void (Jpeg2000JasperReader::*ScanlineFunc)(jas_seqent_t** const , uchar*);
- typedef void (Jpeg2000JasperReader::*ScanlineFuncWrite)(jas_matrix_t**, uchar* );
-
- void copyJasperQt(ScanlineFunc scanlinecopier);
- void copyJasperQtGeneric();
- void copyScanlineJasperQtRGB(jas_seqent_t ** const jasperRow, uchar * qtScanLine);
- void copyScanlineJasperQtRGBA(jas_seqent_t ** const jasperRow, uchar * qtScanLine);
- void copyScanlineJasperQtGray(jas_seqent_t ** const jasperRow, uchar* qtScanLine);
- void copyScanlineJasperQtGrayA(jas_seqent_t ** const jasperRow, uchar* qtScanLine);
-
- void copyQtJasper(const ScanlineFuncWrite scanlinecopier);
- void copyScanlineQtJasperRGB(jas_matrix_t ** jasperRow, uchar * qtScanLine);
- void copyScanlineQtJasperRGBA(jas_matrix_t ** jasperRow, uchar * qtScanLine);
- void copyScanlineQtJasperColormapRGB(jas_matrix_t ** jasperRow, uchar * qtScanLine);
- void copyScanlineQtJasperColormapRGBA(jas_matrix_t ** jasperRow, uchar * qtScanLine);
- void copyScanlineQtJasperColormapGrayscale(jas_matrix_t ** jasperRow, uchar * qtScanLine);
- void copyScanlineQtJasperColormapGrayscaleA(jas_matrix_t ** jasperRow, uchar * qtScanLine);
-
- bool attemptColorspaceChange(int wantedColorSpace);
- bool createJasperMatrix(jas_matrix_t **&matrix);
- bool freeJasperMatrix(jas_matrix_t **matrix);
- void printColorSpaceError();
- jas_image_cmptparm_t createComponentMetadata(const int width, const int height);
- jas_image_t *newRGBAImage(const int width, const int height, bool alpha);
- jas_image_t *newGrayscaleImage(const int width, const int height, bool alpha);
- bool decodeColorSpace(int clrspc, QString &family, QString &specific);
- void printMetatdata(jas_image_t *image);
-
- bool jasperOk;
-
- QIODevice *ioDevice;
- QImage qtImage;
- SubFormat format;
-
- //Qt image properties
- int qtWidth;
- int qtHeight;
- int qtDepth;
- int qtNumComponents;
-
- jas_image_t *jasper_image;
- //jasper image properties
- int jasNumComponents;
- int jasComponentPrecicion[4];
- int computedComponentWidth ;
- int computedComponentHeight;
- int computedComponentHorizontalSubsampling;
- int computedComponentVerticalSubsampling;
- int jasperColorspaceFamily;
- //maps color to component ( ex: colorComponentMapping[RED]
- //gives the component that contains the red color )
- int colorComponentMapping[4];
- bool hasAlpha;
-};
-
-/*!
- \class QtJP2ImageHandler
- \brief The QtJP2ImageHandler class provides support for reading and writing
- JPEG 2000 image files with Qts plugin system.
- Currently, it only supports dynamically-loaded plugins.
-
- JPEG files comes in two subtypes: the JPEG 2000 file format (\c .jp2) and
- the JPEG 2000 code stream format (\c .j2k, \c .jpc, or \c .j2c).
- QtJP2ImageHandler can read and write both types.
-
- To select a subtype, use the setOption() function with the QImageIOHandler::SubType
- option and a parameter value of "jp2" or "j2k".
-
- To set the image quality when writing, you can use setOption() with the
- QImageIOHandler::Quality option, or QImageWriter::setQuality() if your are using a
- QImageWriter object to write the image. The Image quality is specified as an int in
- the range 0 to 100. 0 means maximum compression and 99 means minimum compression.
- 100 selects lossless encoding, and this is the default value.
-
- The JPEG handler is only available as a plugin,
- and this enables you to use normal QImage and QPixmap functions to read and
- write images. For example:
-
- \code
- myLabel->setPixmap(QPixmap("myimage.jp2"));
-
- QPixmap myPixmap;
- myPixmap.save("myimage.jp2", "JP2");
- \endcode
-*/
-
-/*!
- Constructs an instance of QtJP2ImageHandler initialized to use \a device.
-*/
-QtJP2ImageHandler::QtJP2ImageHandler(QIODevice *device)
-:writeQuality(100)
-,subType("jp2")
-{
- setDevice(device);
-}
-
-/*!
- Desctructor for QtJP2ImageHandler.
-*/
-QtJP2ImageHandler::~QtJP2ImageHandler()
-{
-
-}
-
-/*!
- Verifies if some values (magic bytes) are set as expected in the
- header of the file. If the magic bytes were found, we assume that we
- can read the file. The function will assume that the \a iod is
- pointing to the beginning of the JPEG 2000 header. (i.e. it will for
- instance not seek to the beginning of a file before reading).
-
- If \a subType is not 0, it will contain "jp2" or "j2k" upon
- successful return.
-*/
-
-bool QtJP2ImageHandler::canRead(QIODevice *iod, QByteArray *subType)
-{
- bool bCanRead = false;
- if (iod) {
- qint64 oldPos = iod->pos();
-
- unsigned char header[12];
- if (iod->read((char*)header,sizeof(header)) == sizeof(header)) {
- char matchheader1[] = "\000\000\000\fjP \r\n\207\n"; //Jp2 is the JPEG 2000 file format.
- if (memcmp(header, matchheader1, sizeof(matchheader1) - 1) == 0) {
- bCanRead = true;
- if (subType)
- *subType = "jp2";
- } else {
- char matchheader2[] = "\377\117\377\121\000"; //J2c is the JPEG 2000 code stream.
- if (memcmp(header, matchheader2, sizeof(matchheader2) - 1) == 0) {
- bCanRead = true;
- if (subType)
- *subType = "j2k";
- }
- }
- }
- if (iod->isSequential()) {
- int i = sizeof(header) - 1;
- while (i >= 0) {
- char c = header[i--];
- iod->ungetChar(c);
- }
- } else {
- iod->seek(oldPos);
- }
- }
- return bCanRead;
-}
-
-/*! \reimp
-
-*/
-bool QtJP2ImageHandler::canRead() const
-{
- QByteArray subType;
- if (canRead(device(), &subType)) {
- setFormat(subType);
- return true;
- }
- return false;
-}
-
-/*! \reimp
-
-*/
-bool QtJP2ImageHandler::read(QImage *image)
-{
- Jpeg2000JasperReader reader(device());
- return reader.read(image);
-}
-
-/*! \reimp
-
-*/
-bool QtJP2ImageHandler::write(const QImage &image)
-{
- SubFormat subFormat;
- if (this->subType == "jp2")
- subFormat = Jp2Format;
- else
- subFormat = J2kFormat;
-
- Jpeg2000JasperReader writer(device(), subFormat);
- return writer.write(image, this->writeQuality);
-}
-
-/*!
- Get the value associated with \a option.
- \sa setOption()
-*/
-QVariant QtJP2ImageHandler::option(ImageOption option) const
-{
- if (option == Quality) {
- return QVariant(this->writeQuality);
- } else if (option == SubType) {
- return QVariant(this->subType);
- } else {
- return QVariant();
- }
-}
-
-/*!
- The JPEG 2000 handler supports two options.
- Set \a option to QImageIOHandler::Quality to balance between quality and the compression level,
- where \a value should be an integer in the interval [0-100]. 0 is maximum compression (low quality) and 100 is lossless compression (high quality).
-
- Set \a option to QImageIOHandler::Subtype to choose the subtype,
- where \a value should be a string equal to either "jp2" or "j2k"
- \sa option()
-*/
-void QtJP2ImageHandler::setOption(ImageOption option, const QVariant &value)
-{
- if (option == Quality) {
- bool ok;
- const int quality = value.toInt(&ok);
- if (ok)
- this->writeQuality = quality;
- } else if (option == SubType) {
- const QByteArray subTypeCandidate = value.toByteArray();
- // Test for Jpeg200 file format (jp2) - the default, or stream format (j2k).
- if (subTypeCandidate == "jp2" || subTypeCandidate == "j2k")
- this->subType = subTypeCandidate;
- }
-}
-
-/*!
- This function will return true if \a option is set to either QImageIOHandler::Quality or QImageIOHandler::Subtype.
-
-*/
-bool QtJP2ImageHandler::supportsOption(ImageOption option) const
-{
- return (option == Quality || option == SubType);
-}
-
-/*!
- * Return the common identifier of the format.
- * For JPEG 2000 this will return "jp2".
- */
-QByteArray QtJP2ImageHandler::name() const
-{
- return "jp2";
-}
-
-
-/*
- automatic resource handling for a jas_image_t *
-*/
-class ScopedJasperImage {
-public:
- //take reference to the pointer here, because the pointer
- // may change when we change color spaces.
- ScopedJasperImage(jas_image_t *&image):image(image) { }
- ~ScopedJasperImage() { jas_image_destroy(image); }
-private:
- jas_image_t *&image;
-};
-
-
-
-/*! \internal
- Construct a Jpeg2000JasperReader using the provided \a imageIO.
- Note that currenty the jasper library is initialized in this constructor, (and
- freed in the destructor) whic means that:
- -Only one instance of this class may exist at one time
- -no thread safety
-*/
-Jpeg2000JasperReader::Jpeg2000JasperReader(QIODevice *iod, SubFormat format)
-:jasperOk( true )
-,ioDevice( iod )
-,format( format )
-,hasAlpha( false )
-{
- if (jas_init()) {
- jasperOk=false;
- qDebug("Jasper Library initialization failed");
- }
-}
-
-Jpeg2000JasperReader::~Jpeg2000JasperReader()
-{
- if(jasperOk)
- jas_cleanup();
-}
-
-/*! \internal
- Opens the file data and atemts to decode it using the Jasper library.
- returns true if succesfu, false on failure
-*/
-bool Jpeg2000JasperReader::read(QImage *pImage)
-{
- /*
- reading proceeds approx. as follows:
- 1.open stream and decode using jasper
- 2.get image metadata
- 3.change colorspace if neccesary
- 4.create a QImage of the appropriate type (32-bit for RGB, 8-bit for grayscale)
- 5.copy image data from jasper to the qImage
-
- When copying the image data from the jasper data structures to the QImage,
- a generic copy function (copyJasperQt) iterates through the scanlines and calls
- the provided (via the scanlineCopier argument) scanline copy function for each
- scanline. The scanline copy funciton selected according to image metadata sunch
- as color space and the precence of an apha channel.
- */
- if(!jasperOk)
- return false;
- QByteArray fileContents = ioDevice->readAll();
- jas_stream_t *imageData = jas_stream_memopen(fileContents.data(), fileContents.size());
- jasper_image = jas_image_decode(imageData, jas_image_getfmt(imageData), 0);
- jas_stream_close(imageData);
- if (!jasper_image) {
- qDebug("Jasper Library can't decode Jpeg2000 image data");
- return false;
- }
- ScopedJasperImage scopedImage(jasper_image);
- //printMetatdata(jasper_image);
-
- qtWidth = jas_image_width(jasper_image);
- qtHeight =jas_image_height(jasper_image);
- jasNumComponents =jas_image_numcmpts(jasper_image);
- jasperColorspaceFamily = jas_clrspc_fam(jas_image_clrspc(jasper_image));
-
- bool needColorspaceChange = false;
- if ( jasperColorspaceFamily != JAS_CLRSPC_FAM_RGB && jasperColorspaceFamily != JAS_CLRSPC_FAM_GRAY )
- needColorspaceChange=true;
-
- //get per-componet data
- int c;
- for (c = 0; c < jasNumComponents; ++c) {
- jasComponentPrecicion[c]=jas_image_cmptprec(jasper_image, c);
- //test for precicion
- if(jasComponentPrecicion[c]>8 || jasComponentPrecicion[c]<8)
- needColorspaceChange=true;
- //test for subsampling
- if ( jas_image_cmpthstep(jasper_image, c) != 1 || jas_image_cmptvstep(jasper_image, c) !=1)
- needColorspaceChange=true;
- //test for signed components
- if ( jas_image_cmptsgnd(jasper_image, c) !=0 )
- needColorspaceChange=true;
- }
- /*
- If we encounter a differnt color space than RGB
- (such as XYZ or YCbCr) we change that to RGB.
- Also, if any component has "funny" metatdata( such as precicion !=8 bits
- or subsampling !=1) we also do a colorspace
- change in order to convert it to something we can load.
- */
-
- bool decodeOk=true;
- if (needColorspaceChange )
- decodeOk=attemptColorspaceChange(JAS_CLRSPC_SRGB);
-
- if (!decodeOk) {
- printColorSpaceError();
- return false;
- }
-
- /*
- Image metadata may have changed, get from jasper.
- */
- qtWidth = jas_image_width(jasper_image);
- qtHeight =jas_image_height(jasper_image);
- jasNumComponents =jas_image_numcmpts(jasper_image);
- jasperColorspaceFamily = jas_clrspc_fam(jas_image_clrspc(jasper_image));
- for (c = 0; c < jasNumComponents; ++c){
- jasComponentPrecicion[c]=jas_image_cmptprec(jasper_image, c);
- }
-
- if(jasperColorspaceFamily!= JAS_CLRSPC_FAM_RGB && jasperColorspaceFamily!=JAS_CLRSPC_FAM_GRAY) {
- qDebug("The Qt JPEG 2000 reader was unable to convert colorspace to RGB or grayscale");
- return false;
- }
- /*
- if a component has a subsampling factor!=1, we cant trust jas_image_height/width, so
- we need to figure it out ourselves
- */
- bool oddComponentSubsampling=false;
- for (c = 0; c < jasNumComponents; ++c){
- if (jas_image_cmpthstep(jasper_image, c)!=1 || jas_image_cmptvstep(jasper_image, c) !=1) {
- oddComponentSubsampling=true;
- }
- }
-
- if (oddComponentSubsampling) {
- //Check if all components have the same vertical/horizontal dim and subsampling
- computedComponentWidth = jas_image_cmptwidth (jasper_image, 0);
- computedComponentHeight= jas_image_cmptheight (jasper_image, 0);
- computedComponentHorizontalSubsampling=jas_image_cmpthstep(jasper_image, 0);
- computedComponentVerticalSubsampling=jas_image_cmptvstep(jasper_image, 0);
-
- for (c = 1; c < jasNumComponents; ++c) {
- if(computedComponentWidth!=jas_image_cmptwidth (jasper_image, c) ||
- computedComponentWidth!=jas_image_cmptwidth (jasper_image, c) ||
- computedComponentHorizontalSubsampling!=jas_image_cmpthstep(jasper_image, c) ||
- computedComponentVerticalSubsampling!=jas_image_cmptvstep(jasper_image, c) ) {
- qDebug("The Qt JPEG 2000 reader does not support images where component geometry differ from image geometry");
- return false;
- }
- }
- qtWidth= computedComponentWidth * computedComponentHorizontalSubsampling;
- qtHeight=computedComponentHeight * computedComponentVerticalSubsampling;
- }
-
- /*
- Sanity check each component
- */
- for (c = 0; c < jasNumComponents; ++c) {
- //test for precicion
-
- if(jasComponentPrecicion[c]>8 || jasComponentPrecicion[c]<8) {
- qDebug("The Qt JPEG 2000 reader does not support components whith precicion!=8");
- decodeOk=false;
- }
-#if 0
- //test the subsampling factor, ie space between pixels on the image grid
- if (oddComponentSubsampling) {
- qDebug("The Qt JPEG 2000 reader does not support components whith a subsampling factor!=1 (yet)");
- decodeOk=false;
- }
-#endif
- //test for signed components
- if ( jas_image_cmptsgnd(jasper_image, c) !=0 ) {
- qDebug("Qt JPEG 2000 reader does not support signed components ");
- decodeOk=false;
- }
- /*
- test for component/image geomoetry mismach.
- if oddComponentSubsampling, then this is already taken care of above.
- */
- if(!oddComponentSubsampling)
- if ( jas_image_cmpttlx(jasper_image,c) != 0 ||
- jas_image_cmpttly(jasper_image,c) != 0 ||
- jas_image_cmptbrx(jasper_image,c) != jas_image_brx(jasper_image) ||
- jas_image_cmptbry(jasper_image,c) != jas_image_bry(jasper_image) ||
- jas_image_cmptwidth (jasper_image, c) != jas_image_width (jasper_image) ||
- jas_image_cmptheight(jasper_image, c) != jas_image_height(jasper_image )) {
- qDebug("The Qt JPEG 2000 reader does not support images where component geometry differ from image geometry");
- printMetatdata(jasper_image);
- decodeOk=false;
- }
- }
- if (!decodeOk)
- return false;
-
- /*
- at this point, the colorspace shoud be either RGB or grayscale,
- and each component should have eigth bits of precicion and
- no unnsuported geometry.
- */
- // printMetatdata(jasper_image);
-
- // Get color Components
- jasperColorspaceFamily = jas_clrspc_fam(jas_image_clrspc(jasper_image));
- if(jasperColorspaceFamily == JAS_CLRSPC_FAM_RGB) {
- if(jasNumComponents > 4)
- qDebug("JPEG 2000 reader expected 3 or 4 components, got %d", jasNumComponents);
- //set up mapping from R,G,B -> compnent num.
- colorComponentMapping[0] = jas_image_getcmptbytype(jasper_image, JAS_IMAGE_CT_RGB_R);
- colorComponentMapping[1] = jas_image_getcmptbytype(jasper_image, JAS_IMAGE_CT_RGB_G);
- colorComponentMapping[2] = jas_image_getcmptbytype(jasper_image, JAS_IMAGE_CT_RGB_B);
- qtNumComponents = 3;
- } else if (jasperColorspaceFamily == JAS_CLRSPC_FAM_GRAY) {
- if(jasNumComponents>2)
- qDebug("JPEG 2000 reader epected 1 or 2 components, got %d", jasNumComponents);
- colorComponentMapping[0] = jas_image_getcmptbytype(jasper_image, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y));
- qtNumComponents = 1;
- } else {
- printColorSpaceError();
- return false;
- }
-/*
- Get Alpha component if one exists. Due to the lack of test images,
- the loading images with alpha channels is a bit untested. It works
- with images saved with this implementation though.
-*/
- const int posibleAlphaComponent1 = 3;
- const int posibleAlphaComponent2 = 48;
-
- if (jasNumComponents==qtNumComponents + 1) {
- colorComponentMapping[qtNumComponents] = jas_image_getcmptbytype(jasper_image, posibleAlphaComponent1);
- if (colorComponentMapping[qtNumComponents] < 0) {
- colorComponentMapping[qtNumComponents] = jas_image_getcmptbytype(jasper_image, posibleAlphaComponent2);
- }
- if (colorComponentMapping[qtNumComponents] > 0){
- hasAlpha=true;
- qtNumComponents++;
- }
- }
-
- //check for missing components
- for(c = 0; c < qtNumComponents; ++c) {
- if (colorComponentMapping[c] < 0) {
- qDebug("JPEG 2000 reader missing a color component");
- return false;
- }
- }
-
- //create a Qiamge of the correct type
- if(jasperColorspaceFamily == JAS_CLRSPC_FAM_RGB)
- qtImage = QImage(qtWidth, qtHeight, hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32);
- else if (jasperColorspaceFamily == JAS_CLRSPC_FAM_GRAY)
- if (hasAlpha) {
- qtImage = QImage(qtWidth, qtHeight, QImage::Format_ARGB32);
- }else {
- qtImage = QImage(qtWidth, qtHeight, QImage::Format_Indexed8);
- qtImage.setNumColors(256);
- for (int c = 0; c < 256; ++c)
- qtImage.setColor(c, qRgb(c,c,c));
- }
-
- //copy data
- if(oddComponentSubsampling) {
- /*
- This is a hack really, copying of data with component subsampling!=1
- doesn't fit in with the rest of the scanline copying framework.
- */
- copyJasperQtGeneric();
-
- }else if(jasperColorspaceFamily == JAS_CLRSPC_FAM_RGB) {
- if(hasAlpha)
- copyJasperQt(&Jpeg2000JasperReader::copyScanlineJasperQtRGBA);
- else
- copyJasperQt(&Jpeg2000JasperReader::copyScanlineJasperQtRGB);
- } else if (jasperColorspaceFamily == JAS_CLRSPC_FAM_GRAY){
- if(hasAlpha)
- copyJasperQt(&Jpeg2000JasperReader::copyScanlineJasperQtGrayA);
- else
- copyJasperQt(&Jpeg2000JasperReader::copyScanlineJasperQtGray);
- }
- if (decodeOk)
- *pImage = qtImage;
-
- return decodeOk;
-}
-
-/*!
- \internal
-*/
-void Jpeg2000JasperReader::copyJasperQtGeneric()
-{
- //create scanline data poinetrs
- jas_matrix_t **jasperMatrix;
- jas_seqent_t **jasperRow;
- createJasperMatrix(jasperMatrix);
- jasperRow=(jas_seqent_t**)malloc(jasNumComponents*sizeof(jas_seqent_t *));
-
- int imageY=0;
- for(int componentY=0; componentY < computedComponentHeight; ++componentY){
- for (int c = 0; c < jasNumComponents; ++c) {
- jas_image_readcmpt(jasper_image, colorComponentMapping[c], 0, componentY, computedComponentWidth, 1, jasperMatrix[c]);
- jasperRow[c] = jas_matrix_getref(jasperMatrix[c], 0, 0);
- }
- for (int verticalSubsample=0; verticalSubsample<computedComponentVerticalSubsampling; ++verticalSubsample) {
- uchar *scanLineUchar = qtImage.scanLine(imageY);
- QRgb *scanLineQRgb = reinterpret_cast<QRgb *>(scanLineUchar);
- for(int componentX=0; componentX < computedComponentWidth; ++componentX){
- for (int horizontalSubsample=0; horizontalSubsample<computedComponentHorizontalSubsampling; ++horizontalSubsample) {
- if(jasperColorspaceFamily == JAS_CLRSPC_FAM_RGB) {
- if (hasAlpha) {
- *scanLineQRgb++ = jasperRow[3][componentX] << 24 |
- jasperRow[0][componentX] << 16 |
- jasperRow[1][componentX] << 8 |
- jasperRow[2][componentX];
- }else {
- *scanLineQRgb++ = jasperRow[0][componentX] << 16 |
- jasperRow[1][componentX] << 8 |
- jasperRow[2][componentX];
- }
- }else if (jasperColorspaceFamily == JAS_CLRSPC_FAM_GRAY) {
- if (hasAlpha) {
- *scanLineQRgb++ = jasperRow[1][componentX] << 24 |
- jasperRow[0][componentX] << 16 |
- jasperRow[0][componentX] << 8 |
- jasperRow[0][componentX];
- }else {
- *scanLineUchar++ = (jasperRow[0][componentX]);
- }
- }
- }
- }
- ++imageY;
- }
- }
-}
-
-/*!
- \internal
- Copies data from jasper to QImage. The scanlineCopier parameter spcifies which
- function to use for handling each scan line.
-*/
-void Jpeg2000JasperReader::copyJasperQt(const ScanlineFunc scanlineCopier)
-{
- //create scanline data poinetrs
- jas_matrix_t **jasperMatrix;
- jas_seqent_t **jasperRow;
-
- createJasperMatrix(jasperMatrix);
- jasperRow=(jas_seqent_t**)malloc(jasNumComponents*sizeof(jas_seqent_t *));
-
- for(int scanline = 0; scanline < qtHeight; ++scanline){
- for (int c = 0; c < jasNumComponents; ++c) {
- jas_image_readcmpt(jasper_image, colorComponentMapping[c], 0, scanline, qtWidth, 1, jasperMatrix[c]);
- jasperRow[c] = jas_matrix_getref(jasperMatrix[c], 0, 0);
- }
- (this->*scanlineCopier)(jasperRow, qtImage.scanLine(scanline));
- }
-
- freeJasperMatrix(jasperMatrix);
- free(jasperRow);
-}
-
-/*!
- \internal
- copyScanlineJasperQtRGB is copyies RGB data from jasper to an 32 bit QImage.
-*/
-void Jpeg2000JasperReader::copyScanlineJasperQtRGB(jas_seqent_t ** const jasperRow, uchar *qtScanLine)
-{
- QRgb *scanLine = reinterpret_cast<QRgb *>(qtScanLine);
- for (int c = 0; c< qtWidth; ++c) {
- *scanLine++ = 0xFF << 24 | jasperRow[0][c] << 16 | jasperRow[1][c] << 8 | jasperRow[2][c];
- }
-}
-
-/*!
- \internal
- copyScanlineJasperQtRGBA is copyies RGBA data from jasper to an 32 bit QImage.
-*/
-void Jpeg2000JasperReader::copyScanlineJasperQtRGBA(jas_seqent_t ** const jasperRow, uchar *qtScanLine)
-{
- QRgb *scanLine = reinterpret_cast<QRgb *>(qtScanLine);
- for (int c = 0; c< qtWidth; ++c) {
- *scanLine++ = jasperRow[3][c] << 24 | jasperRow[0][c] << 16 | jasperRow[1][c] << 8 | jasperRow[2][c];
- }
-}
-/*!
- \internal
- copyScanlineJasperQtGray copies data from a grayscale image to a 8 bit QImage.
-*/
-void Jpeg2000JasperReader::copyScanlineJasperQtGray(jas_seqent_t ** const jasperRow, uchar *qtScanLine)
-{
- for (int c = 0; c < qtWidth; ++c) {
- // *qtScanLine++ = (jasperRow[0][c] >> (jasComponentPrecicion[0] - 8));
- *qtScanLine++ = (jasperRow[0][c]);
- }
-}
-/*!
- \internal
- copyScanlineJasperQtGrayA copies data from a grayscale image to a 32 bit QImage.
- note that in this case we use an 32-bit image for grayscale data, since the the
- alpha walue is per-pixel, not per-color (per-color alpha is supported by 8-bit QImage)
-*/
-void Jpeg2000JasperReader::copyScanlineJasperQtGrayA(jas_seqent_t ** const jasperRow, uchar *qtScanLine)
-{
- QRgb *scanLine = reinterpret_cast<QRgb *>(qtScanLine);
- for (int c = 0; c < qtWidth; ++c) {
- *scanLine++ = jasperRow[1][c] << 24 | jasperRow[0][c] << 16 | jasperRow[0][c] << 8 | jasperRow[0][c];
- }
-}
-
-/////////////// Write
-
-/*!
- Opens the file data and atemts to decode it using the Jasper library.
- returns true on success, false on failure.
-
- 32 Bit and colormapped color images are encoded as RGB images,
- colormapped grayscale images are encoded as grayscale images
-*/
-bool Jpeg2000JasperReader::write(const QImage &image, int quality)
-{
- if(!jasperOk)
- return false;
-
- qtImage = image;
-
-
- qtHeight=qtImage.height();
- qtWidth=qtImage.width();
- qtDepth=qtImage.depth();
-
- if(qtDepth == 32) // RGB(A)
- {
- jasper_image = newRGBAImage(qtWidth, qtHeight, qtImage.hasAlphaChannel());
- if (qtImage.hasAlphaChannel())
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperRGBA);
- else
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperRGB);
- }
- else if (qtDepth == 8)
- {
- if (qtImage.allGray()) //colormapped grayscale
- {
- jasper_image = newGrayscaleImage(qtWidth, qtHeight, qtImage.hasAlphaChannel());
- if (qtImage.hasAlphaChannel())
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperColormapGrayscaleA);
- else
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperColormapGrayscale);
- }
- else // colormapped color
- {
- jasper_image = newRGBAImage(qtWidth, qtHeight, qtImage.hasAlphaChannel());
- if (qtImage.hasAlphaChannel())
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperColormapRGBA);
- else
- copyQtJasper(&Jpeg2000JasperReader::copyScanlineQtJasperColormapRGB);
- }
- }
- else
- {
- qDebug("Unable to handle color depth %d", qtDepth);
- return false;
- }
-
- int fmtid;
- if (format == Jp2Format)
- fmtid=jas_image_strtofmt(const_cast<char*>("jp2"));
- else /*format=J2cFormat*/
- fmtid=jas_image_strtofmt(const_cast<char*>("jpc")); // JasPer refers to the code stream format as jpc
-
- const int minQuality = 0;
- const int maxQuality = 100;
-
- if (quality == -1)
- quality = 100;
- if (quality <= minQuality)
- quality = minQuality;
- if (quality > maxQuality)
- quality = maxQuality;
-
- // Qt specifies quality as an integer in the range 0..100. Jasper specifies
- // compression rate as an real in the range 0..1, where 1 corresponds to no compression.
- // Computing the rate from quality is difficult, large images get better image
- // quality than small images at the same rate. If the rate is to low, Jasper
- // will generate a completely black image.
- // minirate is the smallest safe rate value.
- const double minRate = 0.001;
- // maxRate specifies maximum target rate, which give the minimum amount
- // of compression. Tests show shat maxRates higer than 0.3 give no additional
- // image quality for most images. Large images could use an even smaller maxRate value.
- const double maxRate = 0.3;
- // Set jasperRate to a value in the range minRate..maxRate. Distribute the quality
- // steps more densly at the lower end if the rate scale.
- const double jasperRate = minRate + pow((double(quality) / double(maxQuality)), 2) * maxRate;
-
- // The Jasper format string contains two optins:
- // rate: rate=x
- // lossy/lossless compression : mode=real/mode=int
- QString jasperFormatString("");
-
- // If quality is not maxQuality, we set lossy encoding. (lossless is default)
- if (quality != maxQuality) {
- jasperFormatString += "mode=real";
- jasperFormatString += QString().sprintf(" rate=%f", jasperRate);
- }
-
- // Open an empty jasper stream that grows automatically
- jas_stream_t * memory_stream = jas_stream_memopen(0, -1);
- // Jasper wants a non-const string.
- char *str = qstrdup(jasperFormatString.toLatin1().constData());
- jas_image_encode(jasper_image, memory_stream,fmtid, str);
- delete [] str;
- jas_stream_flush(memory_stream);
-
- // jas_stream_t::obj_ is a void* which points to the stream implementation,
- // e.g a file stream or a memory stream. But in our case we know that it is
- // a memory stream since we created the object, so we just reiterpret_cast here..
- char *buffer = reinterpret_cast<char *>(reinterpret_cast<jas_stream_memobj_t*>(memory_stream->obj_)->buf_);
- qint64 length = jas_stream_length(memory_stream);
- ioDevice->write( buffer, length );
-
- jas_stream_close( memory_stream );
- jas_image_destroy( jasper_image );
-
- return true;
-}
-
-/*!
- \internal
- Copies data from qtImage to jasper. The scanlineCopier parameter spcifies which
- function to use for handling each scan line.
-
-*/
-void Jpeg2000JasperReader::copyQtJasper(const ScanlineFuncWrite scanlinecopier)
-{ //create jasper matrix for holding one scanline
- jas_matrix_t **jasperMatrix;
- createJasperMatrix(jasperMatrix);
-
- for(int scanline = 0; scanline<qtHeight; ++scanline){
- (this->*scanlinecopier)(jasperMatrix, qtImage.scanLine(scanline));
- //write a scanline of data to jasper_image
- for(int c = 0; c < jasNumComponents; ++c)
- jas_image_writecmpt(jasper_image, c, 0, scanline ,qtWidth, 1, jasperMatrix[c]);
- }
- freeJasperMatrix(jasperMatrix);
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperRGB(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- QRgb *scanLineBuffer = reinterpret_cast<QRgb *>(qtScanLine);
- for( int col=0; col<qtWidth; ++col) {
- jas_matrix_set(jasperRow[0], 0, col, (*scanLineBuffer & 0xFF0000)>>16);
- jas_matrix_set(jasperRow[1], 0, col, (*scanLineBuffer & 0x00FF00)>>8);
- jas_matrix_set(jasperRow[2], 0, col, *scanLineBuffer & 0x0000FF);
- ++scanLineBuffer;
- }
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperRGBA(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- QRgb *scanLineBuffer = reinterpret_cast<QRgb *>(qtScanLine);
- for( int col = 0; col<qtWidth; ++col) {
- jas_matrix_set(jasperRow[3], 0, col, (*scanLineBuffer & 0xFF000000)>>24);
- jas_matrix_set(jasperRow[0], 0, col, (*scanLineBuffer & 0x00FF0000)>>16);
- jas_matrix_set(jasperRow[1], 0, col, (*scanLineBuffer & 0x0000FF00)>>8);
- jas_matrix_set(jasperRow[2], 0, col, *scanLineBuffer & 0x000000FF);
- ++scanLineBuffer;
- }
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperColormapRGB(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- for( int col = 0; col<qtWidth; ++col) {
- QRgb color =qtImage.color(*qtScanLine);
- jas_matrix_set(jasperRow[0], 0, col, qRed (color));
- jas_matrix_set(jasperRow[1], 0, col, qGreen(color));
- jas_matrix_set(jasperRow[2], 0, col, qBlue (color));
- ++qtScanLine;
- }
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperColormapRGBA(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- for( int col = 0; col<qtWidth; ++col) {
- QRgb color =qtImage.color(*qtScanLine);
- jas_matrix_set(jasperRow[0], 0, col, qRed (color));
- jas_matrix_set(jasperRow[1], 0, col, qGreen(color));
- jas_matrix_set(jasperRow[2], 0, col, qBlue (color));
- jas_matrix_set(jasperRow[3], 0, col, qAlpha(color));
- ++qtScanLine;
- }
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperColormapGrayscale(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- for( int col = 0; col<qtWidth; ++col) {
- QRgb color =qtImage.color(*qtScanLine);
- jas_matrix_set(jasperRow[0], 0, col, qGray(color));
- ++qtScanLine;
- }
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::copyScanlineQtJasperColormapGrayscaleA(jas_matrix_t ** jasperRow, uchar * qtScanLine)
-{
- for( int col = 0; col<qtWidth; ++col) {
- QRgb color =qtImage.color(*qtScanLine);
- jas_matrix_set(jasperRow[0], 0, col, qGray(color));
- jas_matrix_set(jasperRow[1], 0, col, qAlpha(color));
- ++qtScanLine;
- }
-}
-
-////////////// Misc
-
-/*!
- \internal
- Attempts to change the color space for the image to wantedColorSpace using the
- jasper library
-*/
-bool Jpeg2000JasperReader::attemptColorspaceChange(int wantedColorSpace)
-{
-// qDebug("Attemting color space change");
- jas_cmprof_t *outprof;
- if (!(outprof = jas_cmprof_createfromclrspc(wantedColorSpace)))
- return false;
-
- jas_image_t *newimage;
- if (!(newimage = jas_image_chclrspc(jasper_image, outprof, JAS_CMXFORM_INTENT_PER))) {
- jas_cmprof_destroy(outprof);
- return false;
- }
- jas_image_destroy(jasper_image);
- jas_cmprof_destroy(outprof);
- jasper_image = newimage;
- return true;
-}
-
-/*!
- \internal
- Set up a component with parameters suitable for storing a QImage
-*/
-jas_image_cmptparm_t Jpeg2000JasperReader::createComponentMetadata(const int width, const int height)
-{
- jas_image_cmptparm_t param;
- param.tlx = 0;
- param.tly = 0;
- param.hstep = 1;
- param.vstep = 1;
- param.width = width;
- param.height = height;
- param.prec = 8;
- param.sgnd = 0;
- return param;
-}
-
-/*!
- \internal
- Create a new RGB jasper image with a possible alpha channel
-*/
-jas_image_t* Jpeg2000JasperReader::newRGBAImage(const int width, const int height, bool alpha)
-{
- jasNumComponents = alpha ? 4 : 3;
- jas_image_cmptparm_t *params = new jas_image_cmptparm_t[jasNumComponents];
- jas_image_cmptparm_t param = createComponentMetadata(width, height);
- for (int c=0; c<jasNumComponents; c++)
- params[c] = param;
- jas_image_t *newImage = jas_image_create(jasNumComponents, params,JAS_CLRSPC_SRGB);
-
- jas_image_setcmpttype(newImage, 0,JAS_IMAGE_CT_RGB_R);
- jas_image_setcmpttype(newImage, 1,JAS_IMAGE_CT_RGB_G);
- jas_image_setcmpttype(newImage, 2,JAS_IMAGE_CT_RGB_B);
- /*
- It is unclear how one stores opacity(alpha) components with jasper,
- the following seems to have no effect. (The opacity component gets
- type id 3 or 48 depending jp2 or j2c format no matter what one puts in here.)
-
- The symbols are defined as follows:
- #define JAS_IMAGE_CT_RGB_R 0
- #define JAS_IMAGE_CT_RGB_G 1
- #define JAS_IMAGE_CT_RGB_B 2
- #define JAS_IMAGE_CT_OPACITY 0x7FFF
- */
- if(alpha)
- jas_image_setcmpttype(newImage, 3, JAS_IMAGE_CT_OPACITY);
- delete[] params;
- return newImage;
-}
-
-/*!
- \internal
- Create a new RGB jasper image with a possible alpha channel
-
-*/
-jas_image_t *Jpeg2000JasperReader::newGrayscaleImage(const int width, const int height, bool alpha)
-{
- jasNumComponents = alpha ? 2 : 1;
- jas_image_cmptparm_t param = createComponentMetadata(width, height);
- jas_image_t *newImage = jas_image_create(1, &param,JAS_CLRSPC_SGRAY);
-
- jas_image_setcmpttype(newImage, 0,JAS_IMAGE_CT_GRAY_Y);
-
- /*
- See corresponding comment for newRGBAImage.
- */
- if(alpha)
- jas_image_setcmpttype(newImage, 1, JAS_IMAGE_CT_OPACITY);
- return newImage;
-}
-/*!
- \internal
- Alocate data structures that holds image data during transfer from the
- Jasper data structures to QImage
-*/
-bool Jpeg2000JasperReader::createJasperMatrix(jas_matrix_t **&matrix)
-{
- matrix = (jas_matrix_t**)malloc(jasNumComponents*sizeof(jas_matrix_t *));
- for (int c = 0; c<jasNumComponents; ++c) {
- matrix[c] = jas_matrix_create(1, qtWidth);
- }
- return true;
-}
-
-/*!
- \internal
- Free data structures that holds image data during transfer from the
- Jasper data structures to QImage
-*/
-bool Jpeg2000JasperReader::freeJasperMatrix(jas_matrix_t **matrix)
-{
- for (int c = 0; c < jasNumComponents; ++c) {
- jas_matrix_destroy(matrix[c]);
- }
- free(matrix);
- return false;
-}
-
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::printColorSpaceError()
-{
- QString colorspaceFamily, colorspaceSpecific;
- decodeColorSpace(jas_image_clrspc(jasper_image), colorspaceFamily, colorspaceSpecific);
- qDebug("Jpeg2000 decoder is not able to handle color space %s - %s", qPrintable(colorspaceFamily), qPrintable(colorspaceSpecific) );
-}
-/*!
- \internal
-
-*/
-bool Jpeg2000JasperReader::decodeColorSpace(int clrspc, QString &family, QString &specific)
-{
- int fam=jas_clrspc_fam(clrspc);
- int mbr=jas_clrspc_mbr(clrspc);
-
- switch(fam)
- {
- case 0:family= "JAS_CLRSPC_FAM_UNKNOWN"; break;
- case 1:family= "JAS_CLRSPC_FAM_XYZ"; break;
- case 2:family= "JAS_CLRSPC_FAM_LAB";break;
- case 3:family= "JAS_CLRSPC_FAM_GRAY";break;
- case 4:family= "JAS_CLRSPC_FAM_RGB";break;
- case 5:family= "JAS_CLRSPC_FAM_YCBCR";break;
- default:family= "Unknown"; return FALSE;
- }
-
- switch(mbr)
- {
- case 0:
- switch(fam)
- {
- case 1: specific= "JAS_CLRSPC_CIEXYZ"; break;
- case 2: specific= "JAS_CLRSPC_CIELAB";break;
- case 3: specific= "JAS_CLRSPC_SGRAY"; break;
- case 4: specific= "JAS_CLRSPC_SRGB"; break;
- case 5: specific= "JAS_CLRSPC_SYCBCR";break;
- default:specific= "Unknown"; return FALSE;
- }
- break;
- case 1:
- switch(fam)
- {
- case 3:specific= "JAS_CLRSPC_GENGRAY";break;
- case 4:specific= "JAS_CLRSPC_GENRGB";break;
- case 5:specific= "JAS_CLRSPC_GENYCBCR"; break;
- default: specific= "Unknown"; return FALSE;
- }
- break;
- default:
- return FALSE;
- }
- return true;
-}
-/*!
- \internal
-
-*/
-void Jpeg2000JasperReader::printMetatdata(jas_image_t *image)
-{
- // jas_image_cmptparm_t param
- qDebug("Image Width: %d", jas_image_width(image));
- qDebug("Image Height: %d", jas_image_height(image));
- qDebug("Coords on reference grid: (%d,%d) (%d,%d)", jas_image_tlx(image), jas_image_tly(image),
- jas_image_brx(image), jas_image_bry(image));
- qDebug("Num image components: %d",jas_image_numcmpts(image));
-
- QString colorspaceFamily;
- QString colorspaceSpecific;
- decodeColorSpace(jas_image_clrspc(image), colorspaceFamily, colorspaceSpecific);
- qDebug("Color model (space): %d, %s - %s",jas_image_clrspc(image), qPrintable(colorspaceFamily), qPrintable(colorspaceSpecific));
-
- qDebug("Componet metadata:");
-
- for(int c=0; c<jas_image_numcmpts(image); ++c)
- {
- qDebug("Componet %d:", c);
- qDebug(" Component type: %d", jas_image_cmpttype(image, c));
- qDebug(" Width: %d", jas_image_cmptwidth(image, c));
- qDebug(" Height: %d", jas_image_cmptheight(image, c));
- qDebug(" Signedness: %d",jas_image_cmptsgnd(image, c));
- qDebug(" Precision: %d", jas_image_cmptprec(image, c));
- qDebug(" Horizontal subsampling factor: %d",jas_image_cmpthstep(image, c));
- qDebug(" Vertical subsampling factor: %d", jas_image_cmptvstep(image, c));
- qDebug(" Coords on reference grid: (%d,%d) (%d,%d)", jas_image_cmpttlx(image,c), jas_image_cmpttly(image,c),
- jas_image_cmptbrx(image,c), jas_image_cmptbry(image,c));
- }
-
-}
-
diff --git a/qtjp2imageformat/src/qtjp2imagehandler.h b/qtjp2imageformat/src/qtjp2imagehandler.h
deleted file mode 100644
index 765a788..0000000
--- a/qtjp2imageformat/src/qtjp2imagehandler.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Solutions component.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * 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.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTJPEG2000IMAGEHANDLER_H
-#define QTJPEG2000IMAGEHANDLER_H
-
-#include <QImageIOHandler>
-#include <QIODevice>
-
-class QtJP2ImageHandler : public QImageIOHandler {
-public:
- QtJP2ImageHandler(QIODevice *device);
- virtual ~QtJP2ImageHandler();
-
- static bool canRead(QIODevice *iod, QByteArray *subType);
- bool canRead() const;
- bool read(QImage *image);
- bool write(const QImage &image);
- QVariant option(ImageOption option) const;
- void setOption(ImageOption option, const QVariant &value);
- bool supportsOption(ImageOption option) const;
-
- QByteArray name() const;
-private:
- int writeQuality;
- QByteArray subType;
-};
-
-#endif