add "cos01" contrast adjustement

This commit is contained in:
tTh
2023-09-17 22:36:08 +02:00
parent bef1c6c5e3
commit 395b262c92
5 changed files with 84 additions and 5 deletions

View File

@@ -14,6 +14,7 @@
/*::------------------------------------------------------------------::*/
#define EQ_STD 4
#define EQ_GRAY 8
#define EQ_COS01 9
#define EQ_2X2 12
#define EQ_LUMIN 14
#define EQ_SQUARE 16
@@ -26,6 +27,7 @@ mot_clef mots_clef[] =
{ "std", EQ_STD, "", "standard method" },
{ "rgb", EQ_STD, "", "same as 'std'" },
{ "gray", EQ_GRAY, "", "gray based" },
{ "cos01", EQ_COS01, "", "cosinus 0->1" },
{ "2x2", EQ_2X2, "", "2x2 matrix" },
{ "lumin", EQ_LUMIN, "i", "param: ident is 256" },
/* { "gamma", EQ_GAMMA, "d", "not implemented" },*/
@@ -38,7 +40,7 @@ mot_clef mots_clef[] =
/*::------------------------------------------------------------------::*/
void usage()
{
fprintf(stderr, "* tga_equalize v 0.0.21 [%s] (dwtfywl) tonton Th\n",
fprintf(stderr, "* tga_equalize v 0.0.23 [%s] (dwtfywl) tonton Th\n",
TGA_OUTILS_VERSION);
fprintf(stderr, " compiled %s at %s\n", __DATE__, __TIME__);
fprintf(stderr, "usage:\n\ttga_equalize avant.tga mode apres.tga [params]\n");
@@ -106,6 +108,10 @@ switch (commande)
foo = Image_pix_sqroot(src, dst, 0);
break;
case EQ_COS01:
foo = Image_egalise_cos01(src, dst, 0);
break;
case EQ_GAMMA:
fprintf(stderr, "no gamma func in %d\n", getpid());
foo = FULL_NUCKED;