1
// ***************************************************************** -*- C++ -*-
3
* Copyright (C) 2004, 2005 Andreas Huggel <ahuggel@gmx.net>
5
* This program is part of the Exiv2 distribution.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
@brief Panasonic MakerNote implemented using the following references:
24
<a href="http://www.compton.nu/panasonic.html">Panasonic MakerNote Information</a> by Tom Hughes,
25
Panasonic.pm of <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/">ExifTool</a> by Phil Harvey,
26
<a href="http://www.ozhiker.com/electronics/pjmt/jpeg_info/panasonic_mn.html">Panasonic Makernote Format Specification</a> by Evan Hunter.
28
@author Andreas Huggel (ahu)
29
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
30
@date 11-Jun-05, ahu: created
32
#ifndef PANASONICMN_HPP_
33
#define PANASONICMN_HPP_
35
// *****************************************************************************
36
// included header files
38
#include "makernote.hpp"
41
// + standard includes
46
// *****************************************************************************
47
// namespace extensions
50
// *****************************************************************************
54
// *****************************************************************************
58
@brief Return an auto-pointer to a newly created empty MakerNote
59
initialized to operate in the memory management model indicated.
60
The caller owns this copy and the auto-pointer ensures that it
63
@param alloc Memory management model for the new MakerNote. Determines if
64
memory required to store data should be allocated and deallocated
65
(true) or not (false). If false, only pointers to the buffer
66
provided to read() will be kept. See Ifd for more background on
68
@param buf Pointer to the makernote character buffer (not used).
69
@param len Length of the makernote character buffer (not used).
70
@param byteOrder Byte order in which the Exif data (and possibly the
71
makernote) is encoded (not used).
72
@param offset Offset from the start of the TIFF header of the makernote
75
@return An auto-pointer to a newly created empty MakerNote. The caller
76
owns this copy and the auto-pointer ensures that it will be
79
MakerNote::AutoPtr createPanasonicMakerNote(bool alloc,
85
// *****************************************************************************
88
//! MakerNote for Panasonic cameras
89
class PanasonicMakerNote : public IfdMakerNote {
91
//! Shortcut for a %PanasonicMakerNote auto pointer.
92
typedef std::auto_ptr<PanasonicMakerNote> AutoPtr;
97
@brief Constructor. Allows to choose whether or not memory management
98
is required for the makernote entries.
100
PanasonicMakerNote(bool alloc =true);
102
PanasonicMakerNote(const PanasonicMakerNote& rhs);
103
//! Virtual destructor
104
virtual ~PanasonicMakerNote() {}
107
//! @name Manipulators
109
int readHeader(const byte* buf,
111
ByteOrder byteOrder);
116
int checkHeader() const;
117
AutoPtr create(bool alloc =true) const;
118
AutoPtr clone() const;
121
//! @name Print functions for Panasonic %MakerNote tags
124
static std::ostream& print0x0001(std::ostream& os, const Value& value);
125
//! Print WhiteBalance
126
static std::ostream& print0x0003(std::ostream& os, const Value& value);
128
static std::ostream& print0x0007(std::ostream& os, const Value& value);
130
static std::ostream& print0x000f(std::ostream& os, const Value& value);
131
//! Print ImageStabilizer
132
static std::ostream& print0x001a(std::ostream& os, const Value& value);
134
static std::ostream& print0x001c(std::ostream& os, const Value& value);
135
//! Print ShootingMode
136
static std::ostream& print0x001f(std::ostream& os, const Value& value);
138
static std::ostream& print0x0020(std::ostream& os, const Value& value);
139
//! Print WhiteBalanceBias
140
static std::ostream& print0x0023(std::ostream& os, const Value& value);
141
//! Print ColorEffect
142
static std::ostream& print0x0028(std::ostream& os, const Value& value);
144
static std::ostream& print0x002c(std::ostream& os, const Value& value);
145
//! Print NoiseReduction
146
static std::ostream& print0x002d(std::ostream& os, const Value& value);
150
// Public only so that we can create a static instance
157
//! Internal virtual create function.
158
PanasonicMakerNote* create_(bool alloc =true) const;
159
//! Internal virtual copy constructor.
160
PanasonicMakerNote* clone_() const;
163
static const TagInfo tagInfo_[];
165
}; // class PanasonicMakerNote
167
static PanasonicMakerNote::RegisterMn registerPanasonicMakerNote;
170
#endif // #ifndef PANASONICMN_HPP_