Calculates the aspect ratio of the image. Required for print_info method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(format_pnm), | intent(in) | :: | this | |||
| real(kind=rk), | intent(out) | :: | ratio |
elemental pure subroutine aspect_ratio(this, ratio) class(format_pnm), intent(in) :: this real(rk), intent(out) :: ratio ratio = real(this%width, kind=rk) / real(this%height, kind=rk) end subroutine aspect_ratio