2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license.
7 * Copyright (c) 2007, Digital Signal Processing Laboratory, Universita degli studi di Perugia (UPG), Italy
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
31 /////////////////////////////////////////////////////////////////////////////
33 // Purpose: wxImage MXF (Material eXchange Format) JPEG 2000 file format handler
34 // Author: G. Baruffa - based on imagjpeg.h, Vaclav Slavik
35 // RCS-ID: $Id: imagmj2.h,v 0.0 2007/11/19 17:00:00 VZ Exp $
36 // Copyright: (c) Giuseppe Baruffa
37 // Licence: wxWindows licence
38 /////////////////////////////////////////////////////////////////////////////
40 #ifndef _WX_IMAGMXF_H_
41 #define _WX_IMAGMXF_H_
46 #include "wx/filename.h"
48 //-----------------------------------------------------------------------------
50 //-----------------------------------------------------------------------------
55 #include "libopenjpeg/openjpeg.h"
57 #define wxBITMAP_TYPE_MXF 51
59 class WXDLLEXPORT wxMXFHandler: public wxImageHandler
64 m_name = wxT("MXF JPEG 2000 file format");
65 m_extension = wxT("mxf");
66 m_type = wxBITMAP_TYPE_MXF;
67 m_mime = wxT("image/mxf");
75 m_expcomps = JPWL_EXPECTED_COMPONENTS;
76 m_maxtiles = JPWL_MAXIMUM_TILES;
80 // decoding engine parameters
81 int m_reducefactor, m_qualitylayers, m_components, m_framenum;
82 wxFileName m_filename;
85 int m_expcomps, m_maxtiles;
89 virtual bool LoadFile(wxImage *image, wxInputStream& stream,
90 bool verbose = true, int index = -1);
91 virtual bool SaveFile(wxImage *image, wxOutputStream& stream,
94 virtual bool DoCanRead(wxInputStream& stream);
98 DECLARE_DYNAMIC_CLASS(wxMXFHandler)
101 #endif // wxUSE_LIBOPENJPEG
105 #endif // _WX_IMAGMXF_H_