forked from tTh/FloatImg
filter is coming again
This commit is contained in:
parent
9dd2064b7a
commit
9c5849e299
3
tools/.gitignore
vendored
3
tools/.gitignore
vendored
@ -17,5 +17,8 @@ cumulfimgs
|
|||||||
fimgops
|
fimgops
|
||||||
fimgfx
|
fimgfx
|
||||||
fimgmetadata
|
fimgmetadata
|
||||||
|
fimgfilters
|
||||||
|
|
||||||
|
*.gif
|
||||||
*.png
|
*.png
|
||||||
*.tiff
|
*.tiff
|
||||||
|
@ -13,9 +13,12 @@ DEPS = ../floatimg.h ../libfloatimg.a Makefile
|
|||||||
all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \
|
all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \
|
||||||
fimg2tiff fimg2text fimg2fits \
|
fimg2tiff fimg2text fimg2fits \
|
||||||
addpnm2fimg cumulfimgs fimgops fimgfx \
|
addpnm2fimg cumulfimgs fimgops fimgfx \
|
||||||
fimgmetadata \
|
fimgmetadata fimgfilters \
|
||||||
fimghalfsize fimgextract
|
fimghalfsize fimgextract
|
||||||
|
|
||||||
|
fimgfilters: fimgfilters.c $(DEPS)
|
||||||
|
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
|
||||||
|
|
||||||
fimgmetadata: fimgmetadata.c $(DEPS)
|
fimgmetadata: fimgmetadata.c $(DEPS)
|
||||||
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
|
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
int verbosity;
|
int verbosity;
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
int filtre_image(char *infname, char *outfname)
|
int filtre_image(char *infname, char *outfname, int type)
|
||||||
{
|
{
|
||||||
FloatImg src, dst;
|
FloatImg src, dst;
|
||||||
int foo;
|
int foo;
|
||||||
@ -30,9 +30,11 @@ static FimgFilter3x3 filtre = {
|
|||||||
1.0/24.0, 0.0
|
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);
|
fimg_show_filter(NULL, &filtre);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((foo = fimg_create_from_dump(infname, &src))) {
|
if ((foo = fimg_create_from_dump(infname, &src))) {
|
||||||
fprintf(stderr, "read error on '%s' is %d\n", infname, foo);
|
fprintf(stderr, "read error on '%s' is %d\n", infname, foo);
|
||||||
@ -52,9 +54,10 @@ if (foo) {
|
|||||||
foo = fimg_dump_to_file(&dst, outfname, 0);
|
foo = fimg_dump_to_file(&dst, outfname, 0);
|
||||||
if (foo) {
|
if (foo) {
|
||||||
fprintf(stderr, "dumping to file give us a %d\n", foo);
|
fprintf(stderr, "dumping to file give us a %d\n", foo);
|
||||||
|
exit(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
return -12;
|
return 0;
|
||||||
}
|
}
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -69,7 +72,7 @@ if (3 != argc) {
|
|||||||
|
|
||||||
fprintf(stderr, " +++ %s +++\n", argv[0]);
|
fprintf(stderr, " +++ %s +++\n", argv[0]);
|
||||||
|
|
||||||
foo = filtre_image(argv[1], argv[2]);
|
foo = filtre_image(argv[1], argv[2], 0);
|
||||||
fprintf(stderr, " filtrage -> %d\n", foo);
|
fprintf(stderr, " filtrage -> %d\n", foo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user