From: hackbard Date: Wed, 24 Nov 2004 18:12:45 +0000 (+0000) Subject: added 3dplot + linescan code X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=8e3d4f991108f6b44e434dde7f11ee9ddfe39b9c;p=physik%2Fnlsop.git added 3dplot + linescan code --- diff --git a/.cvsignore b/.cvsignore index b4cb776..4da6a6a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -11,3 +11,5 @@ be2le dft *.bmp *.plot +linescan +3dplot diff --git a/3dplot.c b/3dplot.c new file mode 100644 index 0000000..fbf1d2b --- /dev/null +++ b/3dplot.c @@ -0,0 +1,47 @@ +/* 3dplot.c -- 3d plot bmp image */ + +/* + * author: frank.zirkelbach@physik.uni-augsburg.de + * + */ + +#define _GNU_SOURCE +#include + +#include +#include "bmp.h" + +int main(int argc,char **argv) { + + t_bmp bmp; + int x,y; + int help; + int val; + + if(argc!=2) { + printf("usage: %s \n",argv[0]); + return -1; + } + + bmp_init(&bmp,2); + bmp.mode=READ; + strcpy(bmp.file,argv[1]); + + bmp_read_file(&bmp); + + dprintf(2,"width = %d\n",bmp.info.width); + + for(x=0;x + +#include +#include "bmp.h" + +int main(int argc,char **argv) { + + t_bmp bmp; + int x,y; + + if(argc!=2) { + printf("usage: %s \n",argv[0]); + return -1; + } + + bmp_init(&bmp,2); + bmp.mode=READ; + strcpy(bmp.file,argv[1]); + + bmp_read_file(&bmp); + + dprintf(2,"width = %d\n",bmp.info.width); + + x=bmp.info.width/2; + for(y=0;y