Exiv2::JpegImage Class Reference

Class to access JPEG images. More...

#include <jpgimage.hpp>

Inheritance diagram for Exiv2::JpegImage:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

Creators
 JpegImage (BasicIo::AutoPtr io, bool create)
 Constructor that can either open an existing Jpeg image or create a new image from scratch. If a new image is to be created, any existing data is overwritten. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.
 ~JpegImage ()
 Destructor.

Protected Member Functions

Accessors
bool isThisType (BasicIo &iIo, bool advance) const
 Determine if the content of the BasicIo instance is a Jpeg image. See base class for more details.
Manipulators
int writeHeader (BasicIo &oIo) const

Friends

bool isJpegType (BasicIo &iIo, bool advance)
 Check if the file iIo is a JPEG image.

Detailed Description

Class to access JPEG images.


Constructor & Destructor Documentation

Exiv2::JpegImage::JpegImage BasicIo::AutoPtr  io,
bool  create
 

Constructor that can either open an existing Jpeg image or create a new image from scratch. If a new image is to be created, any existing data is overwritten. 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.
create Specifies if an existing image should be read (false) or if a new file should be created (true).


Member Function Documentation

bool Exiv2::JpegImage::isThisType BasicIo iIo,
bool  advance
const [protected, virtual]
 

Determine if the content of the BasicIo instance is a Jpeg image. See base class for more details.

Parameters:
iIo BasicIo instance to read from.
advance Flag indicating whether the position of the io should be advanced by the number of characters read to analyse the data (true) or left at its original position (false). This applies only if the type matches.
Returns:
true if the data matches a Jpeg image;
false if the data does not match;

Implements Exiv2::JpegBase.

int Exiv2::JpegImage::writeHeader BasicIo oIo  )  const [protected, virtual]
 

Parameters:
oIo BasicIo instance that the header is written to.
Returns:
0 if successful;
2 if the input image is invalid or can not be read;
4 if the temporary image can not be written to;
-3 other temporary errors;

Implements Exiv2::JpegBase.


The documentation for this class was generated from the following files:
Generated on Sun Feb 26 04:28:38 2006 for Exiv2 by  doxygen 1.4.6