Compare commits
No commits in common. "daeb4c72a7ce5bb3e79709a8e92b6f5720e01b55" and "0ea39f2f9ab0e2c7158c94945b707d6931787246" have entirely different histories.
daeb4c72a7
...
0ea39f2f9a
@ -8,8 +8,8 @@ LIBS = -ltiff -lpnglite -lcfitsio
|
|||||||
|
|
||||||
all: assemblage extracteur
|
all: assemblage extracteur
|
||||||
|
|
||||||
assemblage: assemblage.c ${DEPS}
|
assemblage: assemblage.c Makefile
|
||||||
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@
|
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@
|
||||||
|
|
||||||
extracteur: extracteur.c ${DEPS}
|
extracteur: extracteur.c Makefile
|
||||||
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@
|
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@
|
||||||
|
@ -7,19 +7,12 @@ IMGS="foo.fimg"
|
|||||||
for idx in $(seq 0 69)
|
for idx in $(seq 0 69)
|
||||||
do
|
do
|
||||||
outf=$(printf "%s/X%04d.png" "/tmp" $idx)
|
outf=$(printf "%s/X%04d.png" "/tmp" $idx)
|
||||||
echo "work on "$outf
|
echo $outf
|
||||||
|
|
||||||
x=$(( idx * 4 ))
|
x=$(( idx * 4 ))
|
||||||
y=$(( idx + 80 ))
|
y=$(( idx + 80 ))
|
||||||
|
|
||||||
./extracteur $IMGS 256,128,${x},${y} $outf
|
./extracteur $IMGS 320,200,${x},${y} $outf
|
||||||
error=$?
|
|
||||||
if [ 0 -ne $error ] ; then
|
|
||||||
echo error $error
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
convert -delay 10 /tmp/X????.png foo.gif
|
convert -delay 10 /tmp/X????.png foo.gif
|
||||||
|
@ -24,7 +24,7 @@ float rgb[3];
|
|||||||
if (verbosity) {
|
if (verbosity) {
|
||||||
fimg_describe(in, "source");
|
fimg_describe(in, "source");
|
||||||
fimg_describe(out, "destination");
|
fimg_describe(out, "destination");
|
||||||
print_rectangle(__func__, rect);
|
print_rectangle(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
@ -48,6 +48,7 @@ return 0;
|
|||||||
void help(int k)
|
void help(int k)
|
||||||
{
|
{
|
||||||
puts("Usage:\n\textracteur in.fimg w,h,x,y out.???");
|
puts("Usage:\n\textracteur in.fimg w,h,x,y out.???");
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
|
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
|
||||||
|
|
||||||
@ -61,23 +62,16 @@ char *outfile = "out.fimg";
|
|||||||
|
|
||||||
verbosity = 0;
|
verbosity = 0;
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (foo=0; foo<argc; foo++) {
|
|
||||||
fprintf(stderr, "%9d %s\n", foo, argv[foo]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "hv")) != -1) {
|
while ((opt = getopt(argc, argv, "hv")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'h': help(0), exit(0); break;
|
case 'h': help(0); break;
|
||||||
case 'v': verbosity++; break;
|
case 'v': verbosity++; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (3 != argc-optind) {
|
if (3 != argc-optind) {
|
||||||
fprintf(stderr, "---- %s errcli c=%d %d ----\n", argv[0],
|
fprintf(stderr, "---- %s errcli %d ----\n", argv[0], argc-optind);
|
||||||
argc, argc-optind);
|
|
||||||
help(1);
|
help(1);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -106,13 +100,9 @@ if (4 != parse_rectangle( argv[optind+1], &zone, 0) ) {
|
|||||||
// zone.w = src.width / 2; zone.h = src.height / 2;
|
// zone.w = src.width / 2; zone.h = src.height / 2;
|
||||||
// zone.x = src.width / 4 ; zone.y = src.height / 4;
|
// zone.x = src.width / 4 ; zone.y = src.height / 4;
|
||||||
|
|
||||||
if (verbosity) print_rectangle(argv[0], &zone);
|
if (verbosity) print_rectangle(&zone);
|
||||||
|
|
||||||
foo = fimg_create(&dst, zone.w, zone.h, FIMG_TYPE_RGB);
|
foo = fimg_create(&dst, zone.w, zone.h, FIMG_TYPE_RGB);
|
||||||
if (foo) {
|
|
||||||
fprintf(stderr, "NO PICZ EPIC FAIL %d\n", foo);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
foo = fimg_extractor(&src, &dst, &zone);
|
foo = fimg_extractor(&src, &dst, &zone);
|
||||||
if (foo) {
|
if (foo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user