/**

  * Namespace JpegLoader written by Justin Klein, 2003

  * Based on jpeglib.h and jpeg.lib (from Independent JPEG Group)

  * jpeglib.h and jpeg.lib

  * Copyright (C) 1991-1998, Thomas G. Lane.

  * http://www.ijg.org/

  *

  * This namespace contains two functions to facilitate loading jpeg image files.

  * NOTE: This allocates memory in image->data, so this should be freed after the image is no longer needed.

  * NOTE: For this to work, the project MUST link to jpeg.lib.

  *

  * The generic load function loads a single jpeg image as-is.

  * The LoadWithMask function requires two images, where the second image is used to generate an alpha

* channel for image data in the first.  Both images must be RGB, and they both must have identical dimensions.

* The mask image should be black and white (but saved as RGB) where white generates an alpha

* value of 1 and black generates an alpha value of 0).

  *

  **/

      typedef struct

      {

            char              fileName[1024];

            unsigned long     sizeX;

            unsigned long     sizeY;

            unsigned char     *data;

            int                     bpp;

      } Image;

 

 

      bool Load(char* fileName, Image *image);

      bool LoadWithMask(char* imageName, char* maskName, Image *image);