cranicule is here
This commit is contained in:
1
Modules/.gitignore
vendored
1
Modules/.gitignore
vendored
@@ -3,6 +3,7 @@ chkpixels
|
||||
twavm
|
||||
trnd
|
||||
t_centermag
|
||||
demo_spitpgm
|
||||
|
||||
datas/
|
||||
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
|
||||
@@ -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
21
Modules/SpitPGM.md
Normal 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
18
Modules/demo_spitpgm.f90
Normal 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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user