tweaking...

This commit is contained in:
tTh
2023-01-07 10:40:29 +01:00
parent 2f4272909a
commit 8223cb8e77
5 changed files with 38 additions and 13 deletions

View File

@@ -11,8 +11,8 @@ program chkpixels
implicit none
write(0, *) "------ CHKPIXELS ------"
! call test_spit_as(3)
call test_spit_rgb(256)
call test_spit_as(3)
call test_spit_rgb(128, 222)
STOP 'BECAUSE NO CPU AVAILABLE'
@@ -21,8 +21,8 @@ contains
!-
! exerciser for the 'pixrgb' module
!-
subroutine test_spit_rgb(sz)
integer, intent(in) :: sz
subroutine test_spit_rgb(sz, kg)
integer, intent(in) :: sz, kg
type(t_pixrgb), allocatable :: pixrgb(:,:)
integer :: ix, iy
@@ -33,7 +33,7 @@ contains
do ix=1, sz
do iy=1, sz
pixrgb(ix, iy)%r = ix
pixrgb(ix, iy)%g = 0
pixrgb(ix, iy)%g = mod(ix*iy, kg)
pixrgb(ix, iy)%b = iy
end do
end do
@@ -50,6 +50,7 @@ contains
integer, dimension(SZ, SZ) :: greymap
integer :: ix, iy, value
print *, "test spit as", sz
value = 0
do iy=1, SZ
do ix=1, SZ
@@ -57,10 +58,10 @@ contains
value = value + increment
enddo
enddo
call spit_as_pgm_16 (greymap, 'a.pgm')
call spit_as_pgm_eq (greymap, 'b.pgm')
call spit_as_pgm_8 (greymap, 'c.pgm')
call new_spit_a (greymap, 'x.pgm')
call spit_as_pgm_16 (greymap, 'a.pnm')
call spit_as_pgm_eq (greymap, 'b.pnm')
call spit_as_pgm_8 (greymap, 'c.pnm')
call new_spit_a (greymap, 'x.pnm')
end subroutine
end program