add ranged RGB noise
This commit is contained in:
@@ -75,6 +75,32 @@ subroutine noise_rgb16_pic(prgb, nbre)
|
||||
prgb(ix, iy)%b = mod ( irand(), 65536 )
|
||||
enddo
|
||||
|
||||
end subroutine
|
||||
!-----------------------------------------------------------------------
|
||||
! new: Sat Jun 10 06:50:51 UTC 2023
|
||||
|
||||
subroutine noise_range_rgb16_pic(prgb, rngs, nbre)
|
||||
implicit none
|
||||
|
||||
type(t_pixrgb), dimension(:,:), intent(inout) :: prgb
|
||||
integer, intent(in) :: rngs(6)
|
||||
integer, intent(in) :: nbre
|
||||
integer :: quux, ix, iy, width, height
|
||||
|
||||
print *, 'noise rgb16 range', nbre
|
||||
print *, 'ranges:'
|
||||
print *, rngs
|
||||
|
||||
width = ubound(prgb, 1) ; height = ubound(prgb, 2)
|
||||
|
||||
do quux=1, nbre
|
||||
ix = 1 + mod ( irand(), width )
|
||||
iy = 1 + mod ( irand(), height )
|
||||
prgb(ix, iy)%r = mod ( irand(), 65536 )
|
||||
prgb(ix, iy)%g = mod ( irand(), 65536 )
|
||||
prgb(ix, iy)%b = mod ( irand(), 65536 )
|
||||
enddo
|
||||
|
||||
end subroutine
|
||||
!-----------------------------------------------------------------------
|
||||
end module noisepictures
|
||||
Reference in New Issue
Block a user