Basic Fortran library for PPM image reading and writting. Accepts grayscale and color images as well as up to a maximum of 16 bits per pixel of color depth.
The library consists of two functions, ppmload
and ppmwrite
.
They both require the same number and kinds of arguments in the
same order:
filename
, a file name to open/read a ppm image fileim_arr
, a rank-3 allocatable array to the image data with the shape(nc, ny, nx)
nc
number of color channelsny
height of the imagenx
width of the imagemxvl
an integer to store the maximum value of the image while reading and to indicate its maximum value while writting.
An example of both reading and writting images is contained in the tests folder.