add pixrgb support
This commit is contained in:
@@ -3,20 +3,50 @@
|
||||
|
||||
program chkpixels
|
||||
|
||||
use spitpgm ! main module
|
||||
use trials ! experiments, ymmv.
|
||||
use spitpgm
|
||||
use pixrgb
|
||||
|
||||
use trials ! experiments, ymmv.
|
||||
|
||||
implicit none
|
||||
|
||||
write(0, *) "------ CHKPIXELS ------"
|
||||
call test_alpha(3)
|
||||
! call test_spit_as(3)
|
||||
call test_spit_rgb(256)
|
||||
|
||||
STOP 'BECAUSE NO CPU AVAILABLE'
|
||||
|
||||
contains
|
||||
!-------------------------------------------------------------------
|
||||
!-
|
||||
subroutine test_alpha(increment)
|
||||
subroutine test_spit_rgb(sz)
|
||||
integer, intent(in) :: sz
|
||||
|
||||
type(t_pixrgb), allocatable :: pixrgb(:,:)
|
||||
integer :: ix, iy
|
||||
|
||||
print *, "test spit rgb", sz
|
||||
allocate(pixrgb(sz, sz))
|
||||
! pixrgb = 0
|
||||
|
||||
do ix=1, sz
|
||||
do iy=1, sz
|
||||
|
||||
pixrgb(ix, iy)%r = ix
|
||||
pixrgb(ix, iy)%g = 0
|
||||
pixrgb(ix, iy)%b = iy
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
call rgbpix_spit_as_pnm(pixrgb, "rgb.pnm")
|
||||
|
||||
deallocate(pixrgb)
|
||||
|
||||
end subroutine
|
||||
!-------------------------------------------------------------------
|
||||
!-
|
||||
subroutine test_spit_as(increment)
|
||||
integer, intent(in) :: increment
|
||||
|
||||
integer, parameter :: SZ = 40
|
||||
|
||||
Reference in New Issue
Block a user