Exiv2
epsimage.hpp
Go to the documentation of this file.
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 */
34#ifndef EPSIMAGE_HPP_
35#define EPSIMAGE_HPP_
36
37// *****************************************************************************
38#include "exiv2lib_export.h"
39
40// included header files
41#include "image.hpp"
42
43// *****************************************************************************
44// namespace extensions
45namespace Exiv2
46{
47
48// *****************************************************************************
49// class definitions
50
51 // Add EPS to the supported image formats
52 namespace ImageType {
53 const int eps = 18;
54 }
55
59 class EXIV2API EpsImage : public Image {
60 public:
62
63
77 EpsImage(BasicIo::UniquePtr io, bool create);
79
81
82 void readMetadata() override;
83 void writeMetadata() override;
88 void setComment(const std::string& comment) override;
90
92
93 std::string mimeType() const override;
95
97
98
99 EpsImage(const EpsImage& rhs) = delete;
101 EpsImage& operator=(const EpsImage& rhs) = delete;
103
104 }; // class EpsImage
105
106// *****************************************************************************
107// template, inline and free functions
108
109 // These could be static private functions on Image subclasses but then
110 // ImageFactory needs to be made a friend.
116 EXIV2API Image::UniquePtr newEpsInstance(BasicIo::UniquePtr io, bool create);
117
119 EXIV2API bool isEpsType(BasicIo& iIo, bool advance);
120
121} // namespace Exiv2
122
123#endif // #ifndef EPSIMAGE_HPP_
An interface for simple binary IO.
Definition: basicio.hpp:55
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
Class to access EPS images.
Definition: epsimage.hpp:59
EpsImage & operator=(const EpsImage &rhs)=delete
Assignment operator.
EpsImage(const EpsImage &rhs)=delete
Copy constructor.
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:78
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition: image.hpp:81
const int eps
EPS image type.
Definition: epsimage.hpp:53
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: basicio.hpp:43
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:120
EXIV2API Image::UniquePtr newEpsInstance(BasicIo::UniquePtr io, bool create)
Create a new EpsImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: epsimage.cpp:1150
EXIV2API bool isEpsType(BasicIo &iIo, bool advance)
Check if the file iIo is a EPS image.
Definition: epsimage.cpp:1159