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

Exiv2::JpegImage Class Reference

Helper class to access JPEG images. More...

#include <image.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 (const std::string &path, 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 file 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
int writeHeader (FILE *ofp) const
 Writes a Jpeg header (aka signature) to the file stream.
bool isThisType (FILE *ifp, bool advance) const
 Determine if the content of the file stream is a Jpeg image. See base class for more details.

Friends

bool isJpegType (FILE *ifp, bool advance)
 Check if the file ifp is a JPEG image.

Detailed Description

Helper class to access JPEG images.


Constructor & Destructor Documentation

Exiv2::JpegImage::JpegImage const std::string &  path,
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 file 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:
path Full path to image file.
create Specifies if an existing file should be opened (false) or if a new file should be created (true).


Member Function Documentation

bool Exiv2::JpegImage::isThisType FILE *  ifp,
bool  advance
const [protected, virtual]
 

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

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

Implements Exiv2::JpegBase.

int Exiv2::JpegImage::writeHeader FILE *  ofp  )  const [protected, virtual]
 

Writes a Jpeg header (aka signature) to the file stream.

Parameters:
ofp File stream that the header is written to.
Returns:
0 if successful;
4 if the output file can not be written to;

Implements Exiv2::JpegBase.


The documentation for this class was generated from the following files:
Generated on Sat Mar 5 19:54:23 2005 for Exiv2 by  doxygen 1.4.1