j'adore quand un plan se deroule sans accroc

This commit is contained in:
2019-06-30 01:18:39 +02:00
parent c7d7c8b2dd
commit 1008a778c9
3 changed files with 8 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ addtga2fimg: addtga2fimg.c $(DEPS)
gcc -g $< ../libfloatimg.a -limageSO -lm -o $@
addpnm2fimg: addpnm2fimg.c $(DEPS)
gcc -g $< ../libfloatimg.a -limageSO -lm -o $@
gcc -g $< ../libfloatimg.a -lm -o $@
# if "undefined reference to crc32" then "use -lz"

View File

@@ -32,12 +32,15 @@ if (foo) fprintf(stderr, "create src fimg from '%s' -> %d\n", dstname, foo);
fimg_describe(&qrc, "created fimg from PNM");
#endif
// fprintf(stderr, "src is %dx%d\n", src.width, src.height);
idx = 0;
for (y=0; y<src.height; y++) {
for (x=0; x<src.width; x++) {
dst.R[idx] += src.R[idx];
dst.G[idx] += src.G[idx];
dst.B[idx] += src.B[idx];
idx++;
}
}
@@ -59,8 +62,10 @@ if (3 != argc) {
exit(1);
}
verbosity = 0;
if ( 0==access(argv[2], R_OK|W_OK) ) { /* fimg is readable */
fprintf(stderr, "%s exist\n", argv[2]);
// fprintf(stderr, "%s exist\n", argv[2]);
}
/*
else {