Compare commits

..

No commits in common. "c598c4a2c02976702b55f84fe37bbc8f4c4a1039" and "3bd387f0a9ade7c340f06e6c875fce04679662b5" have entirely different histories.

11 changed files with 19 additions and 33 deletions

View File

@ -20,7 +20,7 @@
* https://git.tetalab.org/tTh/FloatImg
*/
#define FIMG_VERSION (231)
#define FIMG_VERSION (230)
#define RELEASE_NAME ("noname")
#define PATCH_LEVEL ("aaaa")

View File

@ -46,9 +46,9 @@ float *pr, *pg, *pb; /* alias for src pix filds */
float *M; /* alias of filter matrix */
double dval;
#if DEBUG_LEVEL
// #if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, src, dst, filtr);
#endif
// #endif
if (src->type != FIMG_TYPE_RGB) {
fprintf(stderr, "%s: src type %d invalid\n", __func__, src->type);

View File

@ -132,11 +132,9 @@ fprintf(stderr, ">>> %s ( %s %p %d )\n", __func__, str, r, notused);
if (notused) {
fprintf(stderr, "notused was %d, must be 0 in %s\n",
notused, __func__);
}
notused, __func__); }
if (verbosity > 1) fprintf(stderr, "%s: parsing '%s'\n", __func__, str);
foo = sscanf(str, "%d,%d,%d,%d", &w, &h, &x, &y);
if (4 == foo) {
r->x = x, r->y = y, r->w = w, r->h = h;

View File

@ -13,17 +13,11 @@ extern int verbosity; /* must be declared around main() */
/* ---------------------------------------------------------------- */
int fimg_add_alpha_chan(FloatImg *img)
{
fprintf(stderr, ">>> %s ( %p )\n", __func__, img);
return -4;
}
/* ---------------------------------------------------------------- */
int fimg_kill_alpha_chan(FloatImg *img)
{
fprintf(stderr, ">>> %s ( %p )\n", __func__, img);
return -4;
}
/* ---------------------------------------------------------------- */

View File

@ -47,8 +47,8 @@ if (memcmp(filehead.magic, "FIMG", 4)) {
}
/* XXX preparer la gestion des metadata */
if ('a' == filehead.magic[4] && verbosity > 1) {
fprintf(stderr,"*** %s have metadata\n", fname);
if ('a' == filehead.magic[4] && verbosity) {
fprintf(stderr,"\t****** %s have metadata\n", fname);
}
datas[0] = filehead.w;

View File

@ -124,7 +124,7 @@ return 0;
* can compute the maxima of a lot of pictures...
*/
int fimg_max_of_max(FloatImg *img, float maxes[3])
fimg_max_of_max(FloatImg *img, float maxes[3])
{
float localmax[3];
int idx, surface;
@ -426,8 +426,7 @@ if (fi->type != FIMG_TYPE_RGB) {
return;
}
nbre = fi->width * fi->height;
fprintf(stderr, "in %s, drand48() is %f\n", __func__, drand48());
// fprintf(stderr, "%s: %d pixels\n", __func__, nbre);
for (idx=0; idx<nbre; idx++) {
fi->R[idx] = drand48() * kmul;

3
tools/.gitignore vendored
View File

@ -17,8 +17,5 @@ cumulfimgs
fimgops
fimgfx
fimgmetadata
fimgfilters
*.gif
*.png
*.tiff

View File

@ -13,12 +13,9 @@ DEPS = ../floatimg.h ../libfloatimg.a Makefile
all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \
fimg2tiff fimg2text fimg2fits \
addpnm2fimg cumulfimgs fimgops fimgfx \
fimgmetadata fimgfilters \
fimgmetadata \
fimghalfsize fimgextract
fimgfilters: fimgfilters.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
fimgmetadata: fimgmetadata.c $(DEPS)
gcc $(COPT) $< ../libfloatimg.a -lm -o $@

View File

@ -41,7 +41,6 @@ void help(int v)
puts("");
puts("$ cumulfimgs a.fimg b.fimg c-fimg ...");
puts("cumulator options :");
puts("\t-a\tcompute average");
puts("\t-g\tconvert to gray level");
puts("\t-m\tcompute the max of the maxes");
puts("\t-o\tname of output file");
@ -141,6 +140,11 @@ if (rescale) {
fimg_div_cste(&accu, (float)compte);
}
/* XXX */
if (experiment) {
}
/* XXX */
fprintf(stderr, "max of max %9.3f %9.3f %9.3f\n",
vals[0], vals[1], vals[2]);

View File

@ -102,7 +102,7 @@ if (verbosity) {
}
if (argc==optind) {
fprintf(stderr, "what the fsck ?\n");
fprintf(stderr, "wuh ?\n");
exit(0);
}

View File

@ -16,7 +16,7 @@
int verbosity;
/* --------------------------------------------------------------------- */
int filtre_image(char *infname, char *outfname, int type)
int filtre_image(char *infname, char *outfname)
{
FloatImg src, dst;
int foo;
@ -30,11 +30,9 @@ static FimgFilter3x3 filtre = {
1.0/24.0, 0.0
};
fprintf(stderr, ">>> %s ( '%s' '%s' )\n", __func__, infname, outfname);
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( '%s' '%s' %d )\n", __func__, infname, outfname, type);
fimg_show_filter(NULL, &filtre);
#endif
if ((foo = fimg_create_from_dump(infname, &src))) {
fprintf(stderr, "read error on '%s' is %d\n", infname, foo);
@ -54,10 +52,9 @@ if (foo) {
foo = fimg_dump_to_file(&dst, outfname, 0);
if (foo) {
fprintf(stderr, "dumping to file give us a %d\n", foo);
exit(5);
}
return 0;
return -12;
}
/* --------------------------------------------------------------------- */
@ -72,7 +69,7 @@ if (3 != argc) {
fprintf(stderr, " +++ %s +++\n", argv[0]);
foo = filtre_image(argv[1], argv[2], 0);
foo = filtre_image(argv[1], argv[2]);
fprintf(stderr, " filtrage -> %d\n", foo);
return 0;