Loading...
Searching...
No Matches
crwimage.hpp
Go to the documentation of this file.
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CRWIMAGE_HPP_
#define CRWIMAGE_HPP_
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "image.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class declarations
class ExifData;
class IptcData;
// *****************************************************************************
// class definitions
// Add CRW to the supported image formats
namespace ImageType {
const int crw = 3;
}
class EXIV2API CrwImage : public Image {
public:
CrwImage(BasicIo::AutoPtr io, bool create);
void readMetadata();
void writeMetadata();
void setIptcData(const IptcData& iptcData);
std::string mimeType() const;
int pixelWidth() const;
int pixelHeight() const;
private:
CrwImage(const CrwImage& rhs);
CrwImage& operator=(const CrwImage& rhs);
}; // class CrwImage
class EXIV2API CrwParser {
public:
static void decode(CrwImage* pCrwImage, const byte* pData, uint32_t size);
static void encode(
Blob& blob,
const byte* pData,
uint32_t size,
const CrwImage* pCrwImage
);
}; // class CrwParser
// *****************************************************************************
// 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::AutoPtr newCrwInstance(BasicIo::AutoPtr io, bool create);
EXIV2API bool isCrwType(BasicIo& iIo, bool advance);
} // namespace Exiv2
#endif // #ifndef CRWIMAGE_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:55
Exiv2::BasicIo::AutoPtr
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition basicio.hpp:58
Exiv2::CrwImage
Class to access raw Canon CRW images. Only Exif metadata and a comment are supported....
Definition crwimage.hpp:59
Exiv2::CrwParser
Definition crwimage.hpp:113
Exiv2::Image
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition image.hpp:78
Exiv2::Image::AutoPtr
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition image.hpp:81
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:170
Exiv2::ImageType::crw
const int crw
CRW image type (see class CrwImage)
Definition crwimage.hpp:52
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition asfvideo.hpp:36
Exiv2::newCrwInstance
EXIV2API Image::AutoPtr newCrwInstance(BasicIo::AutoPtr io, bool create)
Create a new CrwImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition crwimage.cpp:186
Exiv2::Blob
std::vector< byte > Blob
Container for binary data.
Definition types.hpp:151
Exiv2::isCrwType
EXIV2API bool isCrwType(BasicIo &iIo, bool advance)
Check if the file iIo is a CRW image.
Definition crwimage.cpp:195