/*
 * class JpgReader
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef JPG_READER_HH__
#define JPG_READER_HH__

#include "WImage/PixmapReader.hh"

/**
 * @addtogroup WImage
 * @{ */

/**
 * A JPG file reader. Only JPGs version 6 are supported.
 *
 * BUGS: Only color depths of 1 and 3 are supported.
 */
class
JpgReader: public PixmapReader
{
public:
  /** Constructor. Only calls the mother class' constructor to initialize
   * the {\em ImageArray} reference.
   * @param name
   * the file name
   * @param images
   * the array of greyscale images for the values */
  JpgReader (char const * name, Image *images[])
    : PixmapReader (name, images, 3) { }

protected:
  /** Read the JPG file format. This does the actual work of reading and
   * parsing the image file. It gets called by the {\em read ()} method.
   * @return
   * 0 if successful, -1 on read error, -2 on file format error. */
  virtual int readfmt (void);

}; /* class JpgReader */

/** @} */

#endif /* JPG_READER_HH__ */
