export planes as 16 bits PGM, firt try

This commit is contained in:
tth
2022-02-28 20:00:20 +01:00
parent 6ffc08188d
commit c17132e969
5 changed files with 116 additions and 5 deletions
+20 -1
View File
@@ -14,6 +14,25 @@
int verbosity;
/* ---------------------------------------------------------------- */
int essai_save_plane(int wot)
{
int foo;
FloatImg image;
fprintf(stderr, "-------- %s ( %d ) --------\n", __func__, wot);
foo = fimg_create_from_dump("grabbed.fimg", &image);
if (foo) {
fprintf(stderr, "err loading picz\n");
return -6;
}
foo = fimg_save_plane_as_pgm(&image, "red.pgm", 'r');
foo = fimg_save_plane_as_pgm(&image, "green.pgm", 'g');
foo = fimg_save_plane_as_pgm(&image, "blue.pgm", 'b');
return 0;
}
/* ---------------------------------------------------------------- */
int essai_timer(int uuuh)
{
@@ -269,7 +288,7 @@ if (verbosity) {
fimg_print_sizeof();
}
foo = essai_2gray(NULL, "quux");
foo = essai_save_plane(0);
fprintf(stderr, "retour essai -> %d\n", foo);
// foo = essai_clone_et_copy(0);