From 4ce5241411314bfd9406b6d5457e50d48764464e Mon Sep 17 00:00:00 2001 From: tth Date: Mon, 27 Jun 2022 23:05:42 +0200 Subject: [PATCH] maintenant, les choses importantes... --- Makefile | 352 ---------------------------------------------- README.md | 17 ++- Tools/tga_cadre.c | 10 +- bmp.h | 30 ---- build.sh | 6 +- tthimage.h | 2 +- 6 files changed, 26 insertions(+), 391 deletions(-) delete mode 100644 Makefile delete mode 100644 bmp.h diff --git a/Makefile b/Makefile deleted file mode 100644 index 65c086c..0000000 --- a/Makefile +++ /dev/null @@ -1,352 +0,0 @@ -#----------------------------------------------------------------- -# 1er Fevrier 2000: Je met une cible pour installer -# les fichiers dans le systeme. C'est assez -# rudimentaire/arbitraire, mais c,a marche -# a peu pres, mieux que le Momo... -# -#----------------------------------------------------------------- - -DESTDIR=/usr/local -SHARED_FILES=$(DESTDIR)/share/libimage -HTML_DIR=$(DESTDIR)/html - -#----------------------------------------------------------------- -# -# pour le debuging: option -g -# pour le profiling: option -pg -# pour tracer plein de trucs: -DDEBUG_LEVEL=1 -# if IMGCOMMENT, the image comment is written to the TGA file, -# but this files can't be loaded by Xv... -# pour coredumper dans les situations graves: -DABORT=1 -# -# --> see file 'PORTING.txt' for porting tips on misc -# architextures (just sparc64 for now) -# - -LIBIMG_OPT=-DFORCE_ABORT=1 -DDEBUG_LEVEL=0 -DIMGCOMMENT=0 -CC_OPTS=-Wall -W -g -ansi -Wmissing-prototypes -fPIC -no-pie -CC_HACKS=-DNEED_ALLOCA_H -CFLAGS= $(CC_OPTS) \ - $(LIBIMG_OPT) \ - $(CC_HACKS) \ - -DDESTDIR=\"$(DESTDIR)\" \ - -DSHAREDIR=\"$(SHARED_FILES)\" \ - -DCC_OPTS=\"'$(CC_OPTS)'\" -LINKOPT=-lm -RANLIB=wc -c - -# modify it 'as you like' -AR=ar - -#-------- essentials targets - -all: testtga libs -libs: libimage.a libimageSO.so -trucs: t_t16x24 fnt8to16 t_png - -#----------------------------------------------------------------- - -image.o: image.c tthimage.h Makefile -filtres.o: filtres.c tthimage.h -filtadapt.o: filtadapt.c tthimage.h -sobel4.o: sobel4.c tthimage.h -showdiff.o: showdiff.c tthimage.h -effects.o: effects.c tthimage.h Makefile -effects2.o: effects2.c tthimage.h -effects3.o: effects3.c tthimage.h -television.o: television.c tthimage.h Makefile -tele_2.o: tele_2.c tthimage.h Makefile -classif.o: classif.c tthimage.h -combine.o: combine.c tthimage.h -combine2.o: combine2.c tthimage.h -combine3.o: combine3.c tthimage.h -combine4.o: combine4.c tthimage.h -combine5.o: combine5.c tthimage.h -combine6.o: combine6.c tthimage.h Makefile -combine_rnd.o: combine_rnd.c tthimage.h -basic_io.o: basic_io.c tthimage.h -pcx.o: pcx.c tthimage.h -png.o: png.c tthimage.h -bmp.o: bmp.c tthimage.h bmp.h -tga.o: tga.c tthimage.h Makefile -eps.o: eps.c tthimage.h -pht.o: pht.c tthimage.h -pnm.o: pnm.c tthimage.h -fits.o: fits.c tthimage.h -zoom.o: zoom.c tthimage.h -gadgrect.o: gadgrect.c tthimage.h -ascii.o: ascii.c tthimage.h -asciiart.o: asciiart.c tthimage.h -glitch.o: glitch.c tthimage.h Makefile -contours.o: contours.c tthimage.h Makefile -calculs.o: calculs.c tthimage.h Makefile -contrast.o: contrast.c tthimage.h Makefile -calcluts.o: calcluts.c tthimage.h -luts15bits.o: luts15bits.c tthimage.h -gamma.o: gamma.c tthimage.h -quadpics.o: quadpics.c tthimage.h Makefile -colors.o: colors.c tthimage.h Makefile -colors2.o: colors2.c tthimage.h -col_xyz.o: col_xyz.c tthimage.h -palettes.o: palettes.c tthimage.h -indexcol.o: indexcol.c tthimage.h -col_reduc.o: col_reduc.c tthimage.h Makefile -drawpatt.o: drawpatt.c tthimage.h -operat.o: operat.c tthimage.h Makefile -stereo.o: stereo.c tthimage.h -tools.o: tools.c tthimage.h -mircol.o: mircol.c tthimage.h -mustopen.o: mustopen.c tthimage.h Makefile -msglib.o: msglib.c tthimage.h Makefile -ptlist.o: ptlist.c tthimage.h Makefile -dither.o: dither.c tthimage.h Makefile -dither2.o: dither2.c tthimage.h Makefile -dither3.o: dither3.c tthimage.h Makefile -dither4.o: dither4.c tthimage.h Makefile -bitblt.o: bitblt.c tthimage.h Makefile -detect.o: detect.c tthimage.h Makefile -detect2.o: detect2.c tthimage.h Makefile -op2x2.o: op2x2.c tthimage.h -morpho.o: morpho.c tthimage.h -recurse.o: recurse.c tthimage.h -drawing.o: drawing.c tthimage.h Makefile -draw_alpha.o: draw_alpha.c tthimage.h -marques.o: marques.c tthimage.h Makefile -pov_hf15.o: pov_hf15.c tthimage.h -pov_hf15b.o: pov_hf15b.c tthimage.h -pov_hf15c.o: pov_hf15c.c tthimage.h -pov_hf15d.o: pov_hf15d.c tthimage.h -pov_hf15e.o: pov_hf15e.c tthimage.h -pov_hf15f.o: pov_hf15f.c tthimage.h -pov_hf_synth.o: pov_hf_synth.c tthimage.h -df3.o: df3.c tthimage.h -df3b.o: df3b.c tthimage.h -cadres.o: cadres.c tthimage.h Makefile -cadres2.o: cadres2.c tthimage.h -cadres3.o: cadres3.c tthimage.h -cadres4.o: cadres4.c tthimage.h -cadres84.o: cadres84.c tthimage.h -cadresbox.o: cadresbox.c tthimage.h Makefile -alpha.o: alpha.c tthimage.h Makefile -alpha2.o: alpha2.c tthimage.h -alpha3.o: alpha3.c tthimage.h -mosaic.o: mosaic.c tthimage.h Makefile -text0.o: text0.c tthimage.h Makefile -text1.o: text1.c tthimage.h Makefile -text2.o: text2.c tthimage.h Makefile -text16x24.o: text16x24.c tthimage.h Makefile -freetype.o: freetype.c tthimage.h -vectfont.o: vectfont.c tthimage.h -scale.o: scale.c tthimage.h -halfsize.o: halfsize.c tthimage.h Makefile -doublesz.o: doublesz.c tthimage.h -levels.o: levels.c tthimage.h -patterns2.o: patterns2.c tthimage.h Makefile -patterns.o: patterns.c tthimage.h -patterns3.o: patterns3.c tthimage.h -patterns4.o: patterns4.c tthimage.h -insert.o: insert.c tthimage.h Makefile -plotteur.o: plotteur.c tthimage.h Makefile -imprime.o: imprime.c tthimage.h Makefile -col4bits.o: col4bits.c tthimage.h Makefile -dumppix.o: dumppix.c tthimage.h -warp0.o: warp0.c tthimage.h -warp1.o: warp1.c tthimage.h -warp2.o: warp2.c tthimage.h -warp3.o: warp3.c tthimage.h -xper.o: xper.c tthimage.h Makefile -dissolve.o: dissolve.c tthimage.h -troisD.o: troisD.c tthimage.h -turtle.o: turtle.c tthimage.h -cjpeg.o: cjpeg.c tthimage.h -rgbmask.o: rgbmask.c tthimage.h -octree.o: octree.c tthimage.h -addborder.o: addborder.c tthimage.h -fill_pat.o: fill_pat.c tthimage.h -vectfont.o: vectfont.c tthimage.h -photomaton.o: photomaton.c tthimage.h Makefile -pixeliz.o: pixeliz.c tthimage.h Makefile -pixels.o: pixels.c tthimage.h Makefile -anamorphose.o: anamorphose.c tthimage.h Makefile -life.o: life.c tthimage.h -tamppool.o: tamppool.c tthimage.h -vignetize.o: vignetize.c tthimage.h -7seg.o: 7seg.c tthimage.h Makefile -bitplanes.o: bitplanes.c tthimage.h Makefile -distances.o: distances.c tthimage.h Makefile -gray_ops.o: gray_ops.c tthimage.h Makefile -extractbits.o: extractbits.c tthimage.h Makefile -jauges.o: jauges.c tthimage.h Makefile - -#----------------------------------------------------------------- - -OBJECTS= image.o filtres.o effects.o operat.o \ - tamppool.o gray_ops.o \ - calculs.o calcluts.o luts15bits.o \ - octree.o filtadapt.o sobel4.o \ - classif.o vignetize.o \ - gamma.o zoom.o gadgrect.o \ - pht.o eps.o pnm.o png.o \ - bmp.o pcx.o tga.o \ - colors.o colors2.o col_reduc.o col_xyz.o \ - tools.o mircol.o imprime.o \ - combine.o combine2.o combine3.o combine4.o combine5.o \ - combine6.o combine_rnd.o \ - turtle.o marques.o rgbmask.o \ - television.o tele_2.o \ - effects2.o effects3.o \ - contrast.o glitch.o \ - basic_io.o mustopen.o ptlist.o \ - anamorphose.o quadpics.o \ - dither.o dither2.o dither3.o dither4.o \ - bitblt.o detect.o op2x2.o detect2.o \ - drawing.o draw_alpha.o drawpatt.o \ - pov_hf15.o pov_hf15b.o pov_hf15c.o pov_hf15d.o \ - pov_hf15e.o pov_hf15f.o \ - pov_hf_synth.o df3.o df3b.o \ - alpha.o alpha2.o alpha3.o \ - text0.o text1.o text2.o text16x24.o \ - freetype.o vectfont.o \ - cadres.o cadres2.o cadres3.o cadres4.o \ - cadres84.o cadresbox.o 7seg.o \ - dissolve.o photomaton.o \ - mosaic.o life.o extractbits.o \ - palettes.o col4bits.o indexcol.o \ - xper.o showdiff.o \ - scale.o halfsize.o doublesz.o \ - levels.o stereo.o jauges.o \ - patterns4.o patterns3.o patterns2.o patterns.o \ - fill_pat.o pixeliz.o pixels.o \ - insert.o addborder.o \ - morpho.o ascii.o plotteur.o dumppix.o asciiart.o \ - warp0.o warp1.o warp2.o warp3.o \ - fits.o recurse.o msglib.o troisD.o \ - cjpeg.o bitplanes.o distances.o - -libimage.a: $(OBJECTS) - $(AR) r libimage.a $? - $(RANLIB) libimage.a - -#----------------------------------------------------------------- -# WARNING !!! -# this is my first trial on shared library, so -# use with care... and what is the "-PIC" option ? -# - -libimageSO.so: $(OBJECTS) - gcc -o libimageSO.so -shared $(OBJECTS) - -#----------------------------------------------------------------- -# -# fabrication du (des) programme(s) de test. -# - -essais.o: essais.c tthimage.h Makefile essais.h -essais2.o: essais2.c tthimage.h Makefile essais.h -all_tests.o: all_tests.c tthimage.h Makefile essais.h -essai3d.o: essai3d.c tthimage.h Makefile - -testtga.o: testtga.c tthimage.h essais.h Makefile - gcc $(CFLAGS) -c testtga.c -testtga: testtga.o libimage.a essais.o essais2.o all_tests.o Makefile - gcc $(CFLAGS) testtga.o essais.o essais2.o all_tests.o libimage.a -lm -o testtga - -testrect.o: testrect.c tthimage.h essais.h Makefile - gcc $(CFLAGS) -c testrect.c -testrect: testrect.o libimage.a Makefile - gcc $(CFLAGS) testrect.o libimage.a -lm -o testrect - -testSO: testtga.o libimageSO.so - gcc testtga.o -o testSO libimageSO.so -lm - -essai3d: essai3d.o libimage.a Makefile - gcc $(CFLAGS) essai3d.o -o essai3d libimage.a -lm - -t_ascii: t_ascii.c libimage.a tthimage.h Makefile - gcc $(CFLAGS) t_ascii.c -o t_ascii libimage.a -lm -g - -t_png: t_png.c libimage.a tthimage.h Makefile - gcc $(CFLAGS) t_png.c -o t_png libimage.a -lm -lpng -g - -t_t16x24.o: t_t16x24.c tthimage.h Makefile - gcc -c $(CFLAGS) t_t16x24.c -t_t16x24: t_t16x24.o libimage.a Makefile - gcc $(CFLAGS) t_t16x24.o -o t_t16x24 libimage.a -lm -g -all16x24chars.tga: bigfont.txt t_t16x24 Makefile - ./t_t16x24 -all16x24chars.png: all16x24chars.tga - convert all16x24chars.tga all16x24chars.png - -testpcx: testpcx.c libimage.a Makefile - gcc $(CFLAGS) -g testpcx.c -o testpcx libimage.a -lm -testbmp: testbmp.c libimage.a Makefile - gcc $(CFLAGS) -g testbmp.c -o testbmp libimage.a -lm - -foo: foo.c Makefile libimage.a - gcc $(CFLAGS) foo.c libimage.a -o foo -lm - -fnt8to16: fnt8to16.c Makefile - gcc -Wall fnt8to16.c -o fnt8to16 - -#----------------------------------------------------------------- -# -# procedure d'installation en chantier... -# - -install_lib: - install -d $(DESTDIR)/lib/ - install libimage.a $(DESTDIR)/lib/libimage.a - install libimageSO.so $(DESTDIR)/lib/ - install -d $(DESTDIR)/include/ - install -m 0644 tthimage.h $(DESTDIR)/include/tthimage.h -# install -m 0644 img77.fi $(DESTDIR)/include/img77.fi - install -d $(SHARED_FILES) - install -m 0644 libimage.fonte $(SHARED_FILES)/ - install -m 0644 8x8thin $(SHARED_FILES)/ - install -m 0644 16x24thin $(SHARED_FILES)/ - install -m 0644 bigfont.txt $(SHARED_FILES)/ - install -m 0644 neon.map $(SHARED_FILES)/neon.map - install -m 0644 volcano.map $(SHARED_FILES)/volcano.map - install -m 0644 primaires.map $(SHARED_FILES)/primaires.map - -install_doc: - install -m 0644 libimage.html $(HTML_DIR)/libimage.html - install -m 0644 img-effets.html $(HTML_DIR)/img-effets.html - install -m 0644 img-fichiers.html $(HTML_DIR)/img-fichiers.html - install -m 0644 img-calculs.html $(HTML_DIR)/img-calculs.html - install -m 0644 img-cadres.html $(HTML_DIR)/img-cadres.html - install -m 0644 img-combine.html $(HTML_DIR)/img-combine.html - install -m 0644 img-couleurs.html $(HTML_DIR)/img-couleurs.html - install -m 0644 img-dither.html $(HTML_DIR)/img-dither.html - install -m 0644 img-filtres.html $(HTML_DIR)/img-filtres.html - install -m 0644 img-povhf15.html $(HTML_DIR)/img-povhf15.html - install -m 0644 img-patterns.html $(HTML_DIR)/img-patterns.html - install -m 0644 img-showdiff.html $(HTML_DIR)/img-showdiff.html - install -m 0644 img-stereo.html $(HTML_DIR)/ - install -m 0644 image77.html $(HTML_DIR)/image77.html - install -m 0644 img-devel.html $(HTML_DIR)/img-devel.html - install -m 0644 img-texte.html $(HTML_DIR)/img-texte.html - install -m 0644 img-alpha.html $(HTML_DIR)/img-alpha.html - install -m 0644 img-operat.html $(HTML_DIR)/img-operat.html - -install: install_lib - @echo - @echo "Use 'make install_doc' for installing doc in " $(HTML_DIR) - @echo - -#----------------------------------------------------------------- - -TXTFILES=*.c *.h Makefile Doc/*.html *.txt \ - neon.map volcano.map primaires.map *.sh *.css *.fonte - -TOTAR=$(TXTFILES) pov.tga 8x8thin machin.bin 16x24thin - -lines: $(TXTFILES) - @wc $^ | sort -g - -tarball: $(TOTAR) - date >> tarball - ls $(TOTAR) | sed 's/^/LibImage\//' > MANIFEST - ( cd .. ; tar zcvf libimage.tar.gz `cat LibImage/MANIFEST` ) - -#----------- fini ------------------------------------------------ diff --git a/README.md b/README.md index fd21432..4d9702b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,23 @@ # libtthimage +Ce kluge a pour but de brotcher les images avec vigueur. + Du code né dans les années 1986 sur un Kenitec 286 sous msdos 4 ou 5, -qui s'est un jour retrouvé dans un Linux (kernel 0.99) et qui végète +puis s'est un jour retrouvé dans un Linux (kernel 0.99) et qui végète depuis ~2005. Il est venu le temps de le remettre en route. -Il a pour but de brotcher les images avec vigueur. +## Construction +Tout va bien se passer. +## Utilisation +C'est là que ça se complique. + +## Les outils + +Et ça sert à quoi ? + +## La suite ? + +Bah, c'est l'heure du _gloumiam_, alors on passe à table. diff --git a/Tools/tga_cadre.c b/Tools/tga_cadre.c index 373a07d..b618da3 100644 --- a/Tools/tga_cadre.c +++ b/Tools/tga_cadre.c @@ -69,7 +69,7 @@ mot_clef mots_clef[] = { "burp0", CDR_BURP0, "iii", "cadre burp 0" }, { "burp1", CDR_BURP1, "ii", "cadre burp 1" }, { "burp2", CDR_BURP2, "iiii", "inversion composantes" }, -{ "burp3", CDR_BURP3, "", "en chantier..." }, +{ "burp3", CDR_BURP3, "iiii", "en chantier..." }, { "soft1", CDR_SOFT_1, "", "en chantier aussi" }, { "x", CDR_PIXX, "ii", NULL }, { "pixx", CDR_PIXX, "ii", "pixx me !" }, @@ -116,7 +116,7 @@ exit(5); * argv[1] type cadre * argv[2] image source * argv[3] image destination - * argv[...] paramètres + * argv[...] parametres */ #define FIRST_PARAM 4 @@ -143,7 +143,7 @@ if (strlen(argv[1])==1) argv[0], argv[1]); -/* recherche du type de cadre demandé */ +/* recherche du type de cadre demande */ idx = cherche_mot_clef(argv[2], mots_clef, &commande, &nbargs); if (idx < 0) { @@ -161,7 +161,7 @@ if ( (argc-nbargs) != FIRST_PARAM ) exit(5); } /* - * décodage des paramètres + * decodage des parametres */ foo = parse_parametres(argc, argv, mots_clef[idx].ptypes, FIRST_PARAM); #if DEBUG_LEVEL @@ -178,7 +178,7 @@ if ( (src=Image_TGA_alloc_load(argv[1])) == NULL ) exit(1); } -/* 26 Jan 2002: en fait, est-il nécessaire de cloner l'image ? */ +/* 26 Jan 2002: en fait, est-il necessaire de cloner l'image ? */ if ( (dst=Image_clone(src, 1)) == NULL ) { fprintf(stderr, "tga_cadre: can't clone %p\n", src); diff --git a/bmp.h b/bmp.h deleted file mode 100644 index 7a0d4a8..0000000 --- a/bmp.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * header file for BMP functions - * ----------------------------- - * 'tthimage.h' must be included before this file. - * - */ - -#pragma pack(1) /* est-ce encore utile ? */ - -typedef struct - { - char id[2]; - long filesize; - uint16_t reserved[2]; - long headerSize; - long infoSize; - long width; - long height; - short planes; - short bits; - long compression; - long SizeImage; - long xpixpermeter; - long ypixpermeter; - long clrused; - long clrimportant; - } BMPHEAD; - -#pragma pack() - diff --git a/build.sh b/build.sh index 50c107e..b69e4da 100755 --- a/build.sh +++ b/build.sh @@ -2,5 +2,9 @@ cd Lib -make foo +make testtga +cd .. + +cd Tools +make cd .. diff --git a/tthimage.h b/tthimage.h index 1479bbf..05d3a2b 100644 --- a/tthimage.h +++ b/tthimage.h @@ -4,7 +4,7 @@ http:///la.buvette.org/devel/libimage/ */ #ifndef IMAGE_VERSION_STRING - #define IMAGE_VERSION_STRING "0.4.47" + #define IMAGE_VERSION_STRING "0.4.48" /*::------------------------------------------------------------------::*/ /*