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
|
||||
fimgfx
|
||||
fimgmetadata
|
||||
fimgfilters
|
||||
|
||||
*.gif
|
||||
*.png
|
||||
*.tiff
|
||||
|
@ -13,9 +13,12 @@ DEPS = ../floatimg.h ../libfloatimg.a Makefile
|
||||
all: fimg2pnm mkfimg png2fimg fimgstats fimg2png \
|
||||
fimg2tiff fimg2text fimg2fits \
|
||||
addpnm2fimg cumulfimgs fimgops fimgfx \
|
||||
fimgmetadata \
|
||||
fimgmetadata fimgfilters \
|
||||
fimghalfsize fimgextract
|
||||
|
||||
fimgfilters: fimgfilters.c $(DEPS)
|
||||
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
|
||||
|
||||
fimgmetadata: fimgmetadata.c $(DEPS)
|
||||
gcc $(COPT) $< ../libfloatimg.a -lm -o $@
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
int verbosity;
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
int filtre_image(char *infname, char *outfname)
|
||||
int filtre_image(char *infname, char *outfname, int type)
|
||||
{
|
||||
FloatImg src, dst;
|
||||
int foo;
|
||||
@ -30,9 +30,11 @@ 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);
|
||||
@ -52,9 +54,10 @@ 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 -12;
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
@ -69,7 +72,7 @@ if (3 != argc) {
|
||||
|
||||
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);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user