big cleanup, word on metadata

This commit is contained in:
tTh
2022-07-06 10:27:55 +02:00
parent aa2ced081a
commit c7a51ec7a0
49 changed files with 348 additions and 105 deletions

View File

@@ -1,14 +1,29 @@
/*
* floatimg.h
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
* ugly code from tTh
* http://la.buvette.org/photos/cumul
* http://la.buvette.org/photos/cumul/
* https://git.tetalab.org/tTh/FloatImg
*/
#define FIMG_VERSION (187)
#define FIMG_VERSION (197)
#define RELEASE_NAME ("noname")
/*
* in memory descriptor
* in memory descriptor of a floating image
*/
#define MAGIC_FIMG 0x00F11F00
typedef struct {
@@ -28,7 +43,11 @@ typedef struct {
typedef struct {
char magic[8]; // this is not an asciiz !
int32_t w, h, t;
/*
* what about the packing ?
*/
} FimgFileHead;
/*
* new 11 mars 2022, and a lot of iterations
* around the concept of metadata for my work.
@@ -46,7 +65,7 @@ typedef struct {
} FimgMetaData;
/*
* we MUST look at packing and endianess problems NOW
* and we can thing about a fised size of this datablock
* and we can think about a fised size of this datablock
*/
@@ -118,22 +137,26 @@ int fimg_mul_3(FloatImg *a, FloatImg *b, FloatImg *d);
int fimg_minimum(FloatImg *a, FloatImg *b, FloatImg *d);
int fimg_maximum(FloatImg *a, FloatImg *b, FloatImg *d);
/* funcs/filtrage.c */
/* ---------------------------------------------------- */
/* funcs/filtrage.c */
typedef struct {
float matrix[9];
float mult;
float offset;
} FimgFilter3x3;
/*
* this module contains bugs...
*/
int fimg_killborders(FloatImg *img);
int fimg_lissage_2x2(FloatImg *img);
int fimg_show_filter(char *title, FimgFilter3x3 *filtr);
int fimg_filter_3x3(FloatImg *s, FloatImg *d, FimgFilter3x3 *filtr);
int fimg_contour_2x2(FloatImg *psrc, FloatImg *pdst, int reverse);
/* ---------------------------------------------------- */
/* module sfx0.c */
int fimg_killcolors_a(FloatImg *fimg, float fval);
int fimg_killcolors_b(FloatImg *fimg, float fval);