<*+ CSTDLIB  *>
<*- NOHEADER *>
<*+ M2EXTENSIONS *>

DEFINITION MODULE ["C"] pngwritepalette;

FROM SYSTEM IMPORT ADDRESS, CARD8;



TYPE
     PNGPALETTE=RECORD
       r,
       g,
       b:CARD8;
     END;

     pLINE=POINTER TO ARRAY[0..65535] OF CARD8;
     pROWPOINTERS=POINTER TO ARRAY[0..65535] OF pLINE;
     pPNGPALETTE=POINTER TO ARRAY OF PNGPALETTE;
     pRNS=POINTER TO ARRAY OF CARD8;

PROCEDURE writepng(fn:ARRAY OF CHAR; image:pROWPOINTERS; width, height:CARDINAL;
                   palette:pPNGPALETTE; palettelen, palettedepth:CARDINAL; trns:pRNS):INTEGER;

END pngwritepalette.
