Loading...
Searching...
No Matches
orfimage.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef ORFIMAGE_HPP_
#define ORFIMAGE_HPP_
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "tiffimage.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class definitions
class EXIV2API OrfImage : public TiffImage {
public:
OrfImage(BasicIo::UniquePtr io, bool create);
void printStructure(std::ostream& out, PrintStructureOption option, size_t depth) override;
void readMetadata() override;
void writeMetadata() override;
void setComment(const std::string&) override;
std::string mimeType() const override;
uint32_t pixelWidth() const override;
uint32_t pixelHeight() const override;
}; // class OrfImage
class EXIV2API OrfParser {
public:
static ByteOrder decode(ExifData& exifData, IptcData& iptcData, XmpData& xmpData, const byte* pData, size_t size);
static WriteMethod encode(BasicIo& io, const byte* pData, size_t size, ByteOrder byteOrder, ExifData& exifData,
IptcData& iptcData, XmpData& xmpData);
}; // class OrfParser
// *****************************************************************************
// template, inline and free functions
// These could be static private functions on Image subclasses but then
// ImageFactory needs to be made a friend.
EXIV2API Image::UniquePtr newOrfInstance(BasicIo::UniquePtr io, bool create);
EXIV2API bool isOrfType(BasicIo& iIo, bool advance);
} // namespace Exiv2
#endif // #ifndef ORFIMAGE_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:35
Exiv2::BasicIo::UniquePtr
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Exiv2::ExifData
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition exif.hpp:379
Exiv2::Image::io
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:696
Exiv2::Image::UniquePtr
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:153
Exiv2::OrfImage::printStructure
void printStructure(std::ostream &out, PrintStructureOption option, size_t depth) override
Print out the structure of image file.
Definition orfimage.cpp:54
Exiv2::OrfImage::OrfImage
OrfImage(BasicIo::UniquePtr io, bool create)
Constructor that can either open an existing ORF image or create a new image from scratch....
Definition orfimage.cpp:24
Exiv2::OrfImage::pixelHeight
uint32_t pixelHeight() const override
Return the pixel height of the image.
Definition orfimage.cpp:41
Exiv2::OrfImage::readMetadata
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition orfimage.cpp:70
Exiv2::OrfImage::mimeType
std::string mimeType() const override
Return the MIME type of the image.
Definition orfimage.cpp:29
Exiv2::OrfImage::setComment
void setComment(const std::string &) override
Not supported. ORF format does not contain a comment. Calling this function will throw an Error(Error...
Definition orfimage.cpp:49
Exiv2::OrfImage::pixelWidth
uint32_t pixelWidth() const override
Return the pixel width of the image.
Definition orfimage.cpp:33
Exiv2::OrfImage::writeMetadata
void writeMetadata() override
Write metadata back to the image.
Definition orfimage.cpp:89
Exiv2::OrfParser
Stateless parser class for data in ORF format. Images use this class to decode and encode ORF data....
Definition orfimage.hpp:69
Exiv2::OrfParser::encode
static WriteMethod encode(BasicIo &io, const byte *pData, size_t size, ByteOrder byteOrder, ExifData &exifData, IptcData &iptcData, XmpData &xmpData)
Encode metadata from the provided metadata to ORF format. See TiffParser::encode().
Definition orfimage.cpp:119
Exiv2::OrfParser::decode
static ByteOrder decode(ExifData &exifData, IptcData &iptcData, XmpData &xmpData, const byte *pData, size_t size)
Decode metadata from a buffer pData of length size with data in ORF format to the provided metadata c...
Definition orfimage.cpp:113
Exiv2::TiffImage::TiffImage
TiffImage(BasicIo::UniquePtr io, bool create)
Constructor that can either open an existing TIFF image or create a new image from scratch....
Definition tiffimage.cpp:41
Exiv2::XmpData
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition xmp_exiv2.hpp:138
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::PrintStructureOption
PrintStructureOption
Options for printStructure.
Definition image.hpp:38
Exiv2::isOrfType
EXIV2API bool isOrfType(BasicIo &iIo, bool advance)
Check if the file iIo is an ORF image.
Definition orfimage.cpp:147
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian).
Definition types.hpp:34
Exiv2::WriteMethod
WriteMethod
Type to indicate write method used by TIFF parsers.
Definition types.hpp:41
Exiv2::newOrfInstance
EXIV2API Image::UniquePtr newOrfInstance(BasicIo::UniquePtr io, bool create)
Create a new OrfImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition orfimage.cpp:139