test20 Program

Uses

  • program~~test20~~UsesGraph program~test20 test20 module~forimage forimage program~test20->module~forimage module~forcolor forcolor module~forimage->module~forcolor module~forimage_parameters forimage_parameters module~forimage->module~forimage_parameters module~lut lut module~forimage->module~lut module~pnm pnm module~forimage->module~pnm module~forcolor->module~forimage_parameters module~forcolor->module~pnm iso_fortran_env iso_fortran_env module~forimage_parameters->iso_fortran_env module~pnm->module~forimage_parameters

Calls

program~~test20~~CallsGraph program~test20 test20 proc~deallocate_pnm format_pnm%deallocate_pnm program~test20->proc~deallocate_pnm proc~export_pnm format_pnm%export_pnm program~test20->proc~export_pnm proc~print_info format_pnm%print_info program~test20->proc~print_info proc~remove_channels format_pnm%remove_channels program~test20->proc~remove_channels proc~set_pnm format_pnm%set_pnm program~test20->proc~set_pnm proc~set_format format_pnm%set_format proc~export_pnm->proc~set_format proc~write_header write_header proc~export_pnm->proc~write_header proc~aspect_ratio aspect_ratio proc~print_info->proc~aspect_ratio proc~average_colors average_colors proc~print_info->proc~average_colors proc~pixel_size pixel_size proc~print_info->proc~pixel_size proc~check_pixel_range format_pnm%check_pixel_range proc~remove_channels->proc~check_pixel_range proc~allocate_pixels format_pnm%allocate_pixels proc~set_pnm->proc~allocate_pixels proc~set_file_format format_pnm%set_file_format proc~set_pnm->proc~set_file_format proc~set_pnm->proc~set_format proc~set_header format_pnm%set_header proc~set_pnm->proc~set_header proc~set_pixels format_pnm%set_pixels proc~set_pnm->proc~set_pixels proc~set_comment format_pnm%set_comment proc~set_header->proc~set_comment proc~set_height format_pnm%set_height proc~set_header->proc~set_height proc~set_magicnumber format_pnm%set_magicnumber proc~set_header->proc~set_magicnumber proc~set_max_color format_pnm%set_max_color proc~set_header->proc~set_max_color proc~set_width format_pnm%set_width proc~set_header->proc~set_width proc~set_pixels->proc~check_pixel_range

Variables

Type Attributes Name Initial
type(format_pnm) :: image
integer(kind=ik), dimension(4,12) :: px

Source Code

program test20
    use forimage, only: format_pnm, ik
    implicit none
    
    type(format_pnm) :: image
    integer(ik), dimension(4,12) :: px

    print*,' '
    print'(a)', 'Test 20'

    px(1,:)  = [14,12,11,0,0,0,0,0,0,15,0,15]
    px(2,:)  = [0,0,0,0,15,7,0,0,0,0,0,0]
    px(3,:)  = [0,0,0,0,0,0,0,15,7,0,0,0]
    px(4,:)  = [15,0,15,0,0,0,0,0,0,0,0,0]

    call image%set_pnm(encoding='binary', file_format='ppm', width=4, height=4, max_color=15, comment='test 2', pixels=px)
    call image%remove_channels(remove_r=.true., remove_b=.true.)
    call image%export_pnm('pnm_files/img3_binary_remove')
    call image%export_pnm('pnm_files/img3_ascii_remove', 'ascii')
    call image%print_info()
    call image%finalize()
end program test20