            _        ,Mmpe
   mmmmme  jM,       #F~Bf
  |MMMMM8  MMMmy     #6 #f
      |M8 dMDZFMb    #6 #f
      |M8 MMP  MM    #6 #f
      |M8_MMh_wMM___ #6 #f
      |M8dMMMMMP~~4My#6 #f
      |M8MM' jf    #MM6 #f
      |MMM@  M_____BMM6_Bf
      |MMM[ |M~~~~~~~\M@#f
      |MM#  |M       ,, #f
      |M8   |M[      #6 #f
      tM8    MM,    _M&m#f
      #Mf    4MMm__w@ """
,____wMM'     "MMMM@'
#MMMMMM'        ~~~
"""""~

JPEG Loader 2.0 Delphi version (25-04-2002)
by Tomasz Bucki (Biki/Altair)

Description:
  This program can load non progressive JPEG images
RGB and grayscale

How to use:

To load image from file
   call function

   jpeg_load (fn:string):pjpeg;

To Decode image from memory
   call function

   jpeg_decode (q:pbyte;n:integer):pjpeg;

if any of those functions returns NIL the error has occured
to check error call function jpeg_geterror:integer;

Return value can be:
0 - no error
1 - not JFIF/JPEG file
2 - file not found
3 - corrupted data
4 - format not supported (will happen when you try to decode progressive JPEG)

The returned image is in following format

type tjpeg=record
     xres,yres:longint;
     image: array[0..0] of longint;
     end;
     pjpeg=^tjpeg;

xres,yres - image dimensions in pixels
image - image data packed in dwords 

to delete unneeded image call
 
   procedure jpeg_delete (p:pjpeg);



