pnm_tools Module


Functions

public function load_pnm(filename) result(img_array)

Load pnm file

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

The input filename

Return Value integer, allocatable, dimension(:, :, :)

Loaded image pixel array


Subroutines

public subroutine save_pnm(img_array, maximum_value, filename)

Save array as pnm image.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), dimension(:, :, :) :: img_array

image array. have pix values.

integer, intent(in) :: maximum_value

image maximum value.

character(len=*), intent(in) :: filename

use as the fileame of saved image.

public subroutine display_img(img, maximum_value)

Display array img. save array as pnm image named "output.pnm" then show via imagemagick.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), dimension(:, :, :) :: img

image array, has pixel values.

integer, intent(in) :: maximum_value

image maximum_value.