libtthimage/Lib/foo.c

67 lines
1.2 KiB
C
Raw Normal View History

2022-06-26 11:23:53 +11:00
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
2023-09-18 07:36:08 +11:00
#include <math.h>
2022-06-26 11:23:53 +11:00
2022-06-27 07:55:56 +11:00
#include "../tthimage.h"
2022-06-26 11:23:53 +11:00
/* ============================== */
2023-11-14 23:06:02 +11:00
int essai_false_colors(void)
{
int foo;
RGB_map luts;
foo = Image_gen_fc_lut(27e3, 33, &luts);
fprintf(stderr, "retour gen_fc_lut = %d\n", foo);
return -1;
}
/* ============================== */
int essai_show_t16x24( char *text)
{
if (NULL != text)
Image_t16x24_essai("16x24thin", text, "16x24.tga");
else
2022-10-28 14:54:07 +11:00
Image_t16x24_essai("16x24gruik", "0123456789abcdef", "16x24.tga");
return 0;
}
2023-09-18 07:36:08 +11:00
/* ============================== */
2023-09-18 17:46:13 +11:00
void essai_gradients(void)
2023-09-18 07:36:08 +11:00
{
2023-09-18 17:46:13 +11:00
int foo;
foo = Image_plot_H_gradient("foo.tga", 640, 200);
fprintf(stderr, "plot h gradient -> %d\n", foo);
foo = Image_plot_V_gradient("foo.tga", 900, 200);
fprintf(stderr, "plot v gradient -> %d\n", foo);
2023-09-18 07:36:08 +11:00
}
/* ============================== */
2022-06-26 11:23:53 +11:00
int main(int argc, char *argv[])
{
2023-09-29 08:50:23 +11:00
fprintf(stderr, "*** %s is running\n", argv[0]);
2023-11-14 23:06:02 +11:00
if (argc > 1) {
fprintf(stderr, "argument: %s\n", argv[1]);
Image_print_version(0);
Image_print_sizeof_structs("foo");
}
else {
essai_false_colors();
}
2022-06-27 07:55:56 +11:00
2023-11-14 23:06:02 +11:00
/*
2022-10-28 14:54:07 +11:00
foo = essai_show_t16x24(NULL);
fprintf(stderr, "essai show t16x24 --> %d\n", foo);
2023-11-14 23:06:02 +11:00
*/
2023-09-18 07:36:08 +11:00
2022-06-26 11:23:53 +11:00
return 0;
}