Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

Exiv2::Image Class Reference

Abstract base class defining the interface for an image. More...

#include <image.hpp>

Inheritance diagram for Exiv2::Image:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::auto_ptr< ImageAutoPtr
 Image auto_ptr type.
enum  Type { none, jpeg, exv }
 Supported image formats.

Public Member Functions

Creators
virtual ~Image ()
 Virtual Destructor.
Manipulators
virtual int readMetadata ()=0
 Read metadata from assigned image file into internal buffers.
virtual int writeMetadata ()=0
 Write metadata from internal buffers into to the image fle.
virtual void setExifData (const byte *buf, long size)=0
 Set the Exif data. The data is copied into an internal data buffer and is not written until writeMetadata is called.
virtual void clearExifData ()=0
 Erase any buffered Exif data. Exif data is not removed from the actual file until writeMetadata is called.
virtual void setIptcData (const byte *buf, long size)=0
 Set the Iptc data. The data is copied into an internal data buffer and is not written until writeMetadata is called.
virtual void clearIptcData ()=0
 Erase any buffered Iptc data. Iptc data is not removed from the actual file until writeMetadata is called.
virtual void setComment (const std::string &comment)=0
 Set the image comment. The data is copied into an internal data buffer and is not written until writeMetadata is called.
virtual void clearComment ()=0
 Erase any buffered comment. Comment is not removed from the actual file until writeMetadata is called.
virtual void setMetadata (const Image &image)=0
 Copy all existing metadata from source Image. The data is copied into internal buffers and is not written until writeMetadata is called.
virtual void clearMetadata ()=0
 Erase all buffered metadata. Metadata is not removed from the actual file until writeMetadata is called.
Accessors
virtual bool good () const =0
 Check if the Image instance is valid. Use after object construction.
virtual long sizeExifData () const =0
 Return the size of the Exif data in bytes.
virtual const byteexifData () const =0
 Return a read-only pointer to an Exif data buffer. Do not attempt to write to this buffer.
virtual long sizeIptcData () const =0
 Return the size of the Iptc data in bytes.
virtual const byteiptcData () const =0
 Return a read-only pointer to an Iptc data buffer. Do not attempt to write to this buffer.
virtual std::string comment () const =0
 Return a copy of the image comment. May be an empty string.

Protected Member Functions

Creators
 Image ()
 Default Constructor.

Detailed Description

Abstract base class defining the interface for an image.


Member Function Documentation

virtual bool Exiv2::Image::good  )  const [pure virtual]
 

Check if the Image instance is valid. Use after object construction.

Returns:
true if the Image is in a valid state.

Implemented in Exiv2::JpegBase.

virtual int Exiv2::Image::readMetadata  )  [pure virtual]
 

Read metadata from assigned image file into internal buffers.

Returns:
0 if successful.

Implemented in Exiv2::JpegBase.

virtual void Exiv2::Image::setComment const std::string &  comment  )  [pure virtual]
 

Set the image comment. The data is copied into an internal data buffer and is not written until writeMetadata is called.

Parameters:
comment String containing comment.

Implemented in Exiv2::JpegBase.

virtual void Exiv2::Image::setExifData const byte buf,
long  size
[pure virtual]
 

Set the Exif data. The data is copied into an internal data buffer and is not written until writeMetadata is called.

Parameters:
buf Pointer to the new Exif data.
size Size in bytes of new Exif data.

Implemented in Exiv2::JpegBase.

virtual void Exiv2::Image::setIptcData const byte buf,
long  size
[pure virtual]
 

Set the Iptc data. The data is copied into an internal data buffer and is not written until writeMetadata is called.

Parameters:
buf Pointer to the new Iptc data.
size Size in bytes of new Iptc data.

Implemented in Exiv2::JpegBase.

virtual void Exiv2::Image::setMetadata const Image image  )  [pure virtual]
 

Copy all existing metadata from source Image. The data is copied into internal buffers and is not written until writeMetadata is called.

Parameters:
image Metadata source. All metadata types are copied.

Implemented in Exiv2::JpegBase.

virtual int Exiv2::Image::writeMetadata  )  [pure virtual]
 

Write metadata from internal buffers into to the image fle.

Returns:
0 if successful.

Implemented in Exiv2::JpegBase.


The documentation for this class was generated from the following file:
Generated on Sun Dec 12 17:54:06 2004 for Exiv2 by  doxygen 1.3.9.1