Sets the header of the PNM image. The header includes the magic number, width, height, comment, and max_color.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(format_pnm), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | magic_number | |||
integer, | intent(in) | :: | width | |||
integer, | intent(in) | :: | height | |||
character(len=*), | intent(in) | :: | comment | |||
integer, | intent(in), | optional | :: | max_color |
elemental pure subroutine set_header(this, magic_number, width, height, comment, max_color) class(format_pnm), intent(inout) :: this character(*), intent(in) :: magic_number integer, intent(in) :: width integer, intent(in) :: height character(*), intent(in) :: comment integer, optional, intent(in) :: max_color call this%set_magicnumber(magic_number) call this%set_width(width) call this%set_height(height) call this%set_comment(comment) if (this%file_format /= 'pbm') call this%set_max_color(max_color) end subroutine set_header