pnm2png.c --- conversion from PBM/PGM/PPM-file to PNG-file copyright (C) 1999 by Willem van Schaikversion 1.0 - 1997.10.15 - First version. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.
Download the pngminus package.
Unzip the zip file.
Change directory to PngMinus.
Copy makefile.std to Makefile.
Edit Makefile as follows:
Comment the first definitions of CC and LD. Uncomment the second definitions of CC and LD.
# CC=cc -O -Wall
# LD=cc -O
CC=gcc -O -Wall
LD=gcc -O
Change the definitions of CCFLAGS to point to your include library for libpng and libz.
CCFLAGS=-I/usr/include
Change the definitions of LDFLAGS to point to your static link library for libpng and libz.
LDFLAGS=-L/usr/lib -lpng -lz
Compile with the make command.
Run the program pnm2png to convert from PPM to PNG format.
Copy the program to the directory where you compiled the asc2ppm package.
pnm2png should perform the same functions as pnmtopng in Netpbm.