Exiv2
orfimage_int.hpp
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2021 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
20 #ifndef ORFIMAGE_INT_HPP_
21 #define ORFIMAGE_INT_HPP_
22 
23 // *****************************************************************************
24 // included header files
25 #include "tiffimage_int.hpp"
26 #include "types.hpp"
27 
28 // *****************************************************************************
29 // namespace extensions
30 namespace Exiv2 {
31  namespace Internal {
32 
33 // *****************************************************************************
34 // class definitions
35 
39  class OrfHeader : public TiffHeaderBase {
40  public:
42 
43  explicit OrfHeader(ByteOrder byteOrder =littleEndian);
46  ~OrfHeader();
48 
50 
51  bool read(const byte* pData, uint32_t size);
53 
55 
56  DataBuf write() const;
58  private:
59  // DATA
60  uint16_t sig_; //<! The actual magic number
61  }; // class OrfHeader
62 
63 }} // namespace Internal, Exiv2
64 
65 #endif // #ifndef ORFIMAGE_INT_HPP_
Exiv2::Internal::OrfHeader::~OrfHeader
~OrfHeader()
Destructor.
Definition: orfimage_int.cpp:32
Exiv2::DataBuf::pData_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
Exiv2::Internal::TiffHeaderBase
Abstract base class defining the interface of an image header. Used internally by classes for TIFF-ba...
Definition: tiffimage_int.hpp:52
Exiv2::Internal::OrfHeader::OrfHeader
OrfHeader(ByteOrder byteOrder=littleEndian)
Default constructor.
Definition: orfimage_int.cpp:26
Exiv2::Internal::OrfHeader::read
bool read(const byte *pData, uint32_t size)
Read the image header from a data buffer. Return false if the data buffer does not contain an image h...
Definition: orfimage_int.cpp:36
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
Exiv2::us2Data
EXIV2API long us2Data(byte *buf, uint16_t s, ByteOrder byteOrder)
Convert an unsigned short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:390
Exiv2::Internal::OrfHeader
Olympus ORF header structure.
Definition: orfimage_int.hpp:39
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2::ul2Data
EXIV2API long ul2Data(byte *buf, uint32_t l, ByteOrder byteOrder)
Convert an unsigned long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:403
Exiv2::getUShort
EXIV2API uint16_t getUShort(const byte *buf, ByteOrder byteOrder)
Read a 2 byte unsigned short value from the data buffer.
Definition: types.cpp:273
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
Exiv2::Internal::TiffHeaderBase::setOffset
virtual void setOffset(uint32_t offset)
Set the offset to the start of the root directory.
Definition: tiffimage_int.cpp:1971
Exiv2::Internal::TiffHeaderBase::size
virtual uint32_t size() const
Return the size (in bytes) of the image header.
Definition: tiffimage_int.cpp:1976
Exiv2::Internal::TiffHeaderBase::setByteOrder
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order.
Definition: tiffimage_int.cpp:1961
Exiv2::Internal::TiffHeaderBase::tag
virtual uint16_t tag() const
Return the tag value (magic number) which identifies the buffer as TIFF data.
Definition: tiffimage_int.cpp:1981
Exiv2::Internal::OrfHeader::write
DataBuf write() const
Return the image header in binary format. The caller owns this data and DataBuf ensures that it will ...
Definition: orfimage_int.cpp:57
Exiv2::Internal::TiffHeaderBase::byteOrder
virtual ByteOrder byteOrder() const
Return the byte order (little or big endian).
Definition: tiffimage_int.cpp:1956
Exiv2::getULong
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:278