Exiv2::PsdImage Class Reference

Class to access raw Photoshop images. More...

#include <psdimage.hpp>

Inheritance diagram for Exiv2::PsdImage:

Inheritance graph
[legend]
Collaboration diagram for Exiv2::PsdImage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Creators
 PsdImage (BasicIo::AutoPtr io)
 Constructor to open a Photoshop image. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.
Manipulators
void readMetadata ()
 Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared.
void writeMetadata ()
 Write metadata back to the image.
void setComment (const std::string &comment)
 Not supported. Calling this function will throw an Error(32).
Accessors
std::string mimeType () const
 Return the MIME type of the image.

Detailed Description

Class to access raw Photoshop images.


Constructor & Destructor Documentation

Exiv2::PsdImage::PsdImage BasicIo::AutoPtr  io  ) 
 

Constructor to open a Photoshop image. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.

Parameters:
io An auto-pointer that owns a BasicIo instance used for reading and writing image metadata. Important: The constructor takes ownership of the passed in BasicIo instance through the auto-pointer. Callers should not continue to use the BasicIo instance after it is passed to this method. Use the Image::io() method to get a temporary reference.


Member Function Documentation

std::string Exiv2::PsdImage::mimeType  )  const [virtual]
 

Return the MIME type of the image.

The MIME type returned for Photoshop images is "image/x-photoshop".

Note:
This should really be "image/vnd.adobe.photoshop" (officially registered with IANA in December 2005 -- see http://www.iana.org/assignments/media-types/image/vnd.adobe.photoshop) but Apple, as of Tiger (10.4.8), maps this official MIME type to a dynamic UTI, rather than "com.adobe.photoshop-image" as it should.

Implements Exiv2::Image.

void Exiv2::PsdImage::readMetadata  )  [virtual]
 

Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared.

This method returns success even if no metadata is found in the image. Callers must therefore check the size of individual metadata types before accessing the data.

Exceptions:
Error if opening or reading of the file fails or the image data is not valid (does not look like data of the specific image type).

Implements Exiv2::Image.

void Exiv2::PsdImage::writeMetadata  )  [virtual]
 

Write metadata back to the image.

All existing metadata sections in the image are either created, replaced, or erased. If values for a given metadata type have been assigned, a section for that metadata type will either be created or replaced. If no values have been assigned to a given metadata type, any exists section for that metadata type will be removed from the image.

Exceptions:
Error if the operation fails

Implements Exiv2::Image.


The documentation for this class was generated from the following files:
Generated on Thu Dec 31 03:58:07 2009 for Exiv2 by  doxygen 1.3.9.1