cranicule is here

This commit is contained in:
tTh
2026-06-25 06:43:33 +02:00
parent 31c9d1a802
commit de43a1810c
6 changed files with 46 additions and 2 deletions

1
Modules/.gitignore vendored
View File

@@ -3,6 +3,7 @@ chkpixels
twavm
trnd
t_centermag
demo_spitpgm
datas/

View File

@@ -65,3 +65,6 @@ trnd: trnd.f90 Makefile libtth90modules.a
twavm: twavm.f90 Makefile libtth90modules.a
gfortran $(GFOPT) $< libtth90modules.a -o $@
demo_spitpgm: demo_spitpgm.f90 Makefile libtth90modules.a
gfortran $(GFOPT) $< libtth90modules.a -o $@

View File

@@ -11,7 +11,8 @@ This is just a [WIP](./wavmetrics.f90), see [twavm](./twavm.f90) for a no-use ca
### spitpgm
Write gray level 2d buffer (aka picture) to disk in the NetPNM format.
Some procedures to [write gray level](./SpitPGM.md) 2d buffer of integer
(aka picture) to disk in the *ascii* NetPNM format.
### pixrgb

21
Modules/SpitPGM.md Normal file
View File

@@ -0,0 +1,21 @@
# SpitPGM
What is a `.pgm` file ? And what we can do with this module ?
You have a bi-dimensionnal array of integer and you want show those
fancy datas as a fancy picture ? So we have a few funcs for doing
that..
```
subroutine spit_as_pgm_16(pic, fname)
integer, intent(in), dimension (:,:) :: pic
character (len=*), intent(in) :: fname
```
and
```
subroutine spit_as_pgm_16(pic, fname)
integer, intent(in), dimension (:,:) :: pic
character (len=*), intent(in) :: fname
```

18
Modules/demo_spitpgm.f90 Normal file
View File

@@ -0,0 +1,18 @@
program demo_spitpgm
use spitpgm
integer :: fancydatas(128, 128)
integer :: i, j
fancydatas = 0
do i=1, 128
do j=1, 128
fancydatas(i,j) = mod(i*j, 65000)
enddo
enddo
call spit_as_pgm_16(fancydatas, 'fancydatas.pgm')
end program

View File

@@ -8,7 +8,7 @@ program essai
! integer :: foo, bar
write(0, *) "----------------- essai -------------------"
write(0, *) "------------ essai random -------------"
call init_random_seed() ! in module 'mathstuff'
! call test_noisepictures_rgb()