From 5b3381c7b37d266da0836c7906c14cd438bcabe8 Mon Sep 17 00:00:00 2001 From: tTh Date: Mon, 20 May 2019 08:47:13 +0200 Subject: [PATCH] making the doc --- doc/the_floatimg_hack.tex | 31 +++++++++++++++++++++++++++++++ floatimg.h | 4 ++-- funcs/filtrage.c | 15 +++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 doc/the_floatimg_hack.tex diff --git a/doc/the_floatimg_hack.tex b/doc/the_floatimg_hack.tex new file mode 100644 index 0000000..913ff7e --- /dev/null +++ b/doc/the_floatimg_hack.tex @@ -0,0 +1,31 @@ +\documentclass[a4paper,11pt]{article} + +% \listfiles % pour le debug + +\usepackage[french]{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% XXX \usepackage{lipsum} +\usepackage{makeidx} +\usepackage{listings} +% \usepackage{color} +% \usepackage{url} +\usepackage{xspace} +\usepackage[verbose]{layout} + +\makeindex +% ------------------------------------------------------------------- +\title{DD2 Monitoring} +\author{tTh} + +\begin{document} +\maketitle +\tableofcontents + + + +% ------------------------------------------------------------------- + +\printindex + +\end{document} diff --git a/floatimg.h b/floatimg.h index 41eedf1..e6a67cb 100644 --- a/floatimg.h +++ b/floatimg.h @@ -2,7 +2,7 @@ * floatimg.h */ -#define FIMG_VERSION 58 +#define FIMG_VERSION 60 /* * in memory descriptor @@ -60,7 +60,7 @@ int fimg_to_gray(FloatImg *head); void fimg_add_cste(FloatImg *fi, float value); void fimg_drand48(FloatImg *fi, float kmul); -/* variuos funcs modules */ +/* various funcs modules */ int fimg_load_from_png(char *filename, FloatImg *fimg); int fimg_create_from_png(char *filename, FloatImg *fimg); int fimg_save_as_png(FloatImg *src, char *outname, int flags); diff --git a/funcs/filtrage.c b/funcs/filtrage.c index b342e64..0002de1 100644 --- a/funcs/filtrage.c +++ b/funcs/filtrage.c @@ -9,7 +9,22 @@ /* -------------------------------------------------------------------- */ int fimg_lissage_2x2(FloatImg *img) { +int x, y, offset; +#if DEBUG_LEVEL +fprintf(stderr, ">>> %s ( %p )\n", __func__, img); +fprintf(stderr," type %s size %dx%d\n", img->type, + img->width, img->height); +#endif + +for (y=1; yheight; y++) { + + for (x=1; xwidth; x++) { + + offset = x + (y * img->width); + + } +} return -1; }