add a new effect

This commit is contained in:
tTh
2024-01-05 16:50:25 +01:00
parent 0fb6b03698
commit 7ee4fefaa4
4 changed files with 114 additions and 51 deletions

View File

@@ -41,11 +41,11 @@ subroutine make_red_dot(image, ix, iy)
type(t_pixrgb), intent(inout) :: image(:,:)
integer, intent(in) :: ix, iy
image(ix, iy)%r = 65000
image(ix+1, iy)%r = 65000
image(ix-1, iy)%r = 65000
image(ix+2, iy)%r = 65000
image(ix-2, iy)%r = 65000
image(ix, iy)%r = 55000
image(ix+1, iy)%r = 55000
image(ix-1, iy)%r = 55000
image(ix+2, iy)%r = 55000
image(ix-2, iy)%r = 55000
end subroutine
!-- ------------------------------------------------------------------
@@ -118,10 +118,33 @@ subroutine dim_pix_rgb_mul(pix, fk)
do ix=1, ubound(pix, 1)
do iy=1, ubound(pix, 2)
pix(ix,iy)%r = int(float(pix(ix,iy)%r)*fk)
pix(ix,iy)%g = int(float(pix(ix,iy)%g)*fk)
pix(ix,iy)%b = int(float(pix(ix,iy)%b)*fk)
enddo
enddo
end subroutine
! -------------------------------------------------------------------
subroutine fill_random_gauss(image, mval, marge)
type(t_pixrgb), intent(inout) :: image(:,:)
integer,intent(in) :: mval, marge
integer :: ix, iy
! write(0, *) "dim 1 =", ubound(image, 1)
! write(0, *) "dim 2 =", ubound(image, 2)
do ix=1+marge, ubound(image, 1)-marge
do iy=1+marge, ubound(image, 2)-marge
image(ix, iy)%r = fair_random_gauss(mval)
image(ix, iy)%g = fair_random_gauss(mval)
image(ix, iy)%b = fair_random_gauss(mval)
enddo
enddo
end subroutine
!-- ------------------------------------------------------------------
end module