JPEGEXT Class Reference

Base class for JPEG image access. More...

#include <mi32/jpegext.h>

Inheritance diagram for JPEGEXT:
Inheritance graph
[legend]

List of all members.

Public Types

enum  COLORSPACE { CS_Grayscale, CS_RGB, CS_CMYK }
enum  DCTMETHOD {
  DCT_ISLOW, DCT_IFAST, DCT_FLOAT, DCT_DEFAULT,
  DCT_FASTEST
}

Public Member Functions

virtual ~JPEGEXT ()
COLORSPACE GetColorSpace () const
INT64 GetCompressedSize () const
const Exiv2::ExifData * GetExifData () const
UINT32 GetHeight () const
bool GetMetadata (MISTRING &string)
UINT16 GetNumComponents () const
UINT32 GetWidth () const
 MAKEPARMS (UINT32 width=0, UINT32 height=0, UINT32 quality=75)
ERRVALUE ReadLines (void *buffer, UINT32 numlines)
ERRVALUE Rewind ()
void SetColorSpace (COLORSPACE colorspace)
void SetDCTMethod (DCTMETHOD method)
void SetNumComponents (UINT16 components)
ERRVALUE SetZoom (double zoom)
ERRVALUE WriteLines (const void *buffer, UINT32 numlines)

Protected Types

enum  OPENMODE { OPENMODE_Read = 0, OPENMODE_Write = 1 }

Protected Member Functions

 JPEGEXT (PRIV *pPriv)

Detailed Description

Base class for JPEG image access.

Parameters for making a new JPEG.


Member Enumeration Documentation

Enumerator:
CS_Grayscale 
CS_RGB 
CS_CMYK 
Enumerator:
DCT_ISLOW 
DCT_IFAST 

Slow but accurate integer algorithm.

DCT_FLOAT 

faster, less accurate integer method

DCT_DEFAULT 

floating-point method

DCT_FASTEST 

default method (normally DCT_ISLOW)

fastest method (normally DCT_IFAST)

enum JPEGEXT::OPENMODE [protected]
Enumerator:
OPENMODE_Read 
OPENMODE_Write 

Constructor & Destructor Documentation

virtual JPEGEXT::~JPEGEXT (  )  [virtual]

Destructor.

JPEGEXT::JPEGEXT ( PRIV *  pPriv  )  [protected]

Base class, cannot be constructed directly.


Member Function Documentation

COLORSPACE JPEGEXT::GetColorSpace (  )  const

Get the color space of an existing JPEG.

INT64 JPEGEXT::GetCompressedSize (  )  const

Get the current size of the compressed JPEG if opened for writing.

Do not use if opened for reading.

const Exiv2::ExifData* JPEGEXT::GetExifData (  )  const

Get the Exif data for an existing JPEG.

Will return NULL if the Exif header could not be read.

UINT32 JPEGEXT::GetHeight (  )  const

Get the height of an existing JPEG.

Result is affected by use of SetZoom.

bool JPEGEXT::GetMetadata ( MISTRING string  ) 

Get the Exif data for an existing JPEG as a formatted text.

Does NOT clear the string first Returns true if there was Exif data, false if not

UINT16 JPEGEXT::GetNumComponents (  )  const

Get the number of components of an existing JPEG.

UINT32 JPEGEXT::GetWidth (  )  const

Get the width of an existing JPEG.

Result is affected by use of SetZoom.

JPEGEXT::MAKEPARMS ( UINT32  width = 0,
UINT32  height = 0,
UINT32  quality = 75 
)

Constructor.

ERRVALUE JPEGEXT::ReadLines ( void *  buffer,
UINT32  numlines 
)

Read lines.

Returns EBadFuncParm if this is opened for writing.

Parameters:
buffer Buffer to contain pixels
numlines Number of scanlines to read
ERRVALUE JPEGEXT::Rewind (  ) 

Rewind reader to beginning.

void JPEGEXT::SetColorSpace ( COLORSPACE  colorspace  ) 

Set the input color space.

void JPEGEXT::SetDCTMethod ( DCTMETHOD  method  ) 

Set the algorithm used for the DCT step.

void JPEGEXT::SetNumComponents ( UINT16  components  ) 
ERRVALUE JPEGEXT::SetZoom ( double  zoom  ) 

Set zoom value for decompression.

Must be used after Open or Rewind before ReadLines. Will affect result of GetHeight and GetWidth

Parameters:
zoom Zoom value, must be 1, 1/2, 1/4 or 1/8
ERRVALUE JPEGEXT::WriteLines ( const void *  buffer,
UINT32  numlines 
)
Parameters:
buffer Buffer containing pixels to write
numlines Number of lines to write

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:33:31 2012 for TNTsdk 2012 by  doxygen 1.6.1