diff --git a/Lib/Makefile b/Lib/Makefile index 0ef56c3..9f4d8b5 100644 --- a/Lib/Makefile +++ b/Lib/Makefile @@ -199,7 +199,10 @@ testbmp: testbmp.c $(DEPS) ../libtthimage.a essais.o: essais.c $(DEPS) essais.h gcc $(CFLAGS) $< -c -testtga: testtga.c $(DEPS) ../libtthimage.a essais.o +testtga.o: testtga.c testtga.c $(DEPS) + gcc $(CFLAGS) $< -c + +testtga: testtga.o ../libtthimage.a essais.o gcc $(CFLAGS) $< essais.o ../libtthimage.a -lm -o $@ #----------------------------------------------------------------- diff --git a/Lib/alpha2.c b/Lib/alpha2.c index 2a8c266..6d02a51 100644 --- a/Lib/alpha2.c +++ b/Lib/alpha2.c @@ -8,7 +8,7 @@ #include #include #include -#include "tthimage.h" +#include "../tthimage.h" /*::------------------------------------------------------------------::*/ int Image_alpha_setvalue(Image_Desc *dst, int v_alpha) diff --git a/Lib/gamma.c b/Lib/gamma.c index 1578849..0720d73 100644 --- a/Lib/gamma.c +++ b/Lib/gamma.c @@ -5,7 +5,7 @@ #include #include -#include "tthimage.h" +#include "../tthimage.h" /*::------------------------------------------------------------------::*/ /* @@ -32,5 +32,3 @@ for (foo=0; foo<256; foo++) return FULL_NUCKED; } /*::------------------------------------------------------------------::*/ - -/*::------------------------------------------------------------------::*/ diff --git a/Lib/pcx.c b/Lib/pcx.c index 8ed4728..85f5210 100644 --- a/Lib/pcx.c +++ b/Lib/pcx.c @@ -22,7 +22,7 @@ #define DEBUG_LEVEL 1 #endif -#include "tthimage.h" +#include "../tthimage.h" /*::------------------------------------------------------------------::*/ #define LIBPCX_VERSION "0.0.12" diff --git a/Lib/readjpeg.c b/Lib/readjpeg.c index 061d89b..b25582f 100644 --- a/Lib/readjpeg.c +++ b/Lib/readjpeg.c @@ -8,13 +8,18 @@ #include +#include /* XXX to be checked ? */ + #include "../tthimage.h" /*::------------------------------------------------------------------::*/ int try_to_read_a_jpeg_file(char *fname, Image_Desc *img) { -fprintf(stderr, ">>> %s ( %s %p )\n", __func__, fname, img); +fprintf(stderr, ">>> %s ( '%s' %p )\n", __func__, fname, img); +fprintf(stderr, " %s compiled %s at %s\n", __FILE__, __DATE__, __TIME__); + +fprintf(stderr, " JPEG_LIB_VERSION = %d\n", JPEG_LIB_VERSION); return FULL_NUCKED; } diff --git a/Lib/testtga.c b/Lib/testtga.c index 1e1b69c..7b566ac 100644 --- a/Lib/testtga.c +++ b/Lib/testtga.c @@ -15,6 +15,17 @@ /*::------------------------------------------------------------------::*/ +int test_du_jpeg_reader(char *filename) +{ +Image_Desc destimg; +int foo; + +fprintf(stderr, ">>> %s ( '%s' ) \n", __func__, filename); + +foo = try_to_read_a_jpeg_file(filename, &destimg); + +return FULL_NUCKED; +} /*::------------------------------------------------------------------::*/ int main(int argc, char *argv[]) { @@ -23,7 +34,10 @@ int foo; printf("\n========== TestTga %s %s ==========\n", __DATE__, __TIME__); Image_print_version(2); -/* Image_print_sizeof_structs("tth was here"); */ + +#if DEBUG_LEVEL +Image_print_sizeof_structs("tth was here"); +#endif if (argc != 2) { @@ -38,15 +52,16 @@ else Image_start_chrono("Essai", 0); +foo = test_du_jpeg_reader("in.jpeg"); +fprintf(stderr, " essai lecture jpeg -> %d\n", foo); + +#if 0 foo = Test_Dithering(fichier, 17); fprintf(stderr, "essai dithering -> %d\n", foo); -#if 0 -/* Test_des_patterns("/tmp/pattt", 0, 0); foo = Essai_des_jauges(fichier, 17); - */ foo = Essai_Extractbits(fichier, 17); diff --git a/Tools/README.md b/Tools/README.md index ac0be1d..d96b831 100644 --- a/Tools/README.md +++ b/Tools/README.md @@ -45,9 +45,11 @@ Paramètres mal documentés. ## tga_dither +Comment drastiquement réduire le nombre de couleurs d'une image ? + ## tga_export -Attendu avec impatience, il aura le support complet des PNG. +Attendu avec impatience, il aura le support complet des PNG. Un jour... ## tga_effects @@ -82,4 +84,4 @@ tth@konrad:~/Devel/libtthimage$ ## genplot2 - +Outil de tracé pseudo-générique et farci de bugs. WIP ME HARDLY ! diff --git a/Tools/genplot2.c b/Tools/genplot2.c index 752b76e..c656d29 100644 --- a/Tools/genplot2.c +++ b/Tools/genplot2.c @@ -149,16 +149,15 @@ else filename = argv[optind]; if (argc<=optind+1) image = "image.tga"; else image = argv[optind+1]; +/*----------- giving to the yuser some useless informations --- */ +#if DEBUG_LEVEL +fprintf(stderr, "*** Genplot2 v 1.0.10 (dwtfywl) 1995,2010,2022 TontonTh \n"); +#endif if (verbeux) { fprintf(stderr, "argc %d optind %d file '%s' image '%s'\n", argc, optind, filename, image); fprintf(stderr, " picsize : %d %d\n", outw, outh); } -/*----------- giving to the yuser some useless informations --- */ -#if DEBUG_LEVEL -fprintf(stderr, "*** Genplot2 v 1.0.9 (dwtfywl) 1995,2010,2022 TontonTh \n"); -fprintf(stderr, " picsize : %d %d\n", outw, outh); -#endif /*----------- opening input file and getting MIN and MAX values */