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

DEFINITION MODULE ["C"] pngread;

FROM SYSTEM IMPORT ADDRESS;

PROCEDURE readpng(fn:ARRAY OF CHAR; row_pointers:ARRAY OF ADDRESS;
                  VAR maxx, maxy, maxxbyte:INTEGER):INTEGER;            

 (* set maxx maxy maxxbyte to allocated memory *)
 (* returns -2 if image larger *) 
 (* maxx maxy returns real size *)

END pngread.
