From 8e3d4f991108f6b44e434dde7f11ee9ddfe39b9c Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 24 Nov 2004 18:12:45 +0000 Subject: [PATCH] added 3dplot + linescan code --- .cvsignore | 2 ++ 3dplot.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ linescan.c | 42 ++++++++++++++++++++++++++++++++++++++++++ makefile | 8 +++++++- 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 3dplot.c create mode 100644 linescan.c 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