Browse Source

integration de fimg_colors_mixer_a dans fimgfx

tth 3 months ago
parent
commit
9517c8a10f
2 changed files with 13 additions and 2 deletions
  1. 7
    1
      tools/essai.sh
  2. 6
    1
      tools/fimgfx.c

+ 7
- 1
tools/essai.sh View File

@@ -23,7 +23,13 @@ function essai_drand48
23 23
 ./fimgstats -vv $TMPF
24 24
 }
25 25
 #  -----------------------------------------------------
26
+function essai_cmixa
27
+{
28
+./mkfimg -v -t tpat0 $TMPF 800 600
29
+./fimgfx -v cmixa $TMPF bar.fimg
30
+}
31
+#  -----------------------------------------------------
26 32
 
27
-essai_drand48
33
+essai_cmixa
28 34
 
29 35
 #  -----------------------------------------------------

+ 6
- 1
tools/fimgfx.c View File

@@ -21,7 +21,7 @@ typedef struct {
21 21
 	} Fx;
22 22
 
23 23
 enum fxid { Fx_cos01=5, Fx_cos010, Fx_pow2, Fx_sqrt, Fx_gray0, Fx_halfsz0,
24
-		Fx_rot90,
24
+		Fx_rot90, Fx_cmixa,
25 25
 		Fx_xper };
26 26
 
27 27
 Fx fx_list[] = {
@@ -32,6 +32,7 @@ Fx fx_list[] = {
32 32
 	{ "gray0",		Fx_gray0,	0,	1 },
33 33
 	{ "halfsz0",		Fx_halfsz0,	0,	1 },
34 34
 	{ "rot90",		Fx_rot90,	0,	0 },
35
+	{ "cmixa",		Fx_cmixa,	0,	1 },
35 36
 	{ "xper",		Fx_xper,	0,	1 },
36 37
 	{ NULL,			0,	0 }
37 38
 	};
@@ -156,6 +157,10 @@ switch (action) {
156 157
 		
157 158
 	case Fx_rot90:
158 159
 		foo = fimg_rotate_90(&src, &dest, 0);		break;
160
+
161
+	case Fx_cmixa:
162
+		fimg_copy_data(&src, &dest);
163
+		foo = fimg_colors_mixer_a(&dest, 2.0);		break;
159 164
 		
160 165
 	case Fx_halfsz0:
161 166
 		fprintf(stderr, "halfsize was not implemented\n");

Loading…
Cancel
Save