cosmetic
This commit is contained in:
parent
97ad716bd2
commit
b3da0e6ec0
2
Lib/.gitignore
vendored
2
Lib/.gitignore
vendored
@ -3,4 +3,4 @@
|
|||||||
*.gif
|
*.gif
|
||||||
|
|
||||||
cflow.txt
|
cflow.txt
|
||||||
|
reduce.map
|
||||||
|
@ -66,7 +66,9 @@ return ( (r1+g1+b1) - (r2+g2+b2) );
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*::------------------------------------------------------------------::*/
|
/*::------------------------------------------------------------------::*/
|
||||||
|
/*
|
||||||
|
* XXX please explain parameters usage !
|
||||||
|
*/
|
||||||
#define TAILLE (1<<12)
|
#define TAILLE (1<<12)
|
||||||
int Image_calc_Map_4bits(Image_Desc *img, RGB_map *map, int nbre)
|
int Image_calc_Map_4bits(Image_Desc *img, RGB_map *map, int nbre)
|
||||||
{
|
{
|
||||||
@ -80,13 +82,13 @@ fprintf(stderr, " Calc map 4 bits: nbre = %d\n", nbre);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( (nbre<1) || (nbre>255) ) {
|
if ( (nbre<1) || (nbre>255) ) {
|
||||||
fprintf(stderr, "Calc map 4 bits: nbre %d out of range\n", nbre);
|
fprintf(stderr, "%s: nbre %d out of range\n", __func__, nbre);
|
||||||
return BAD_COLOR_NUMBER;
|
return BAD_COLOR_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface = img->width * img->height;
|
surface = img->width * img->height;
|
||||||
#if DEBUG_LEVEL
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, " calc Map 4 bits: surface de l'image = %ld pixels\n", surface);
|
fprintf(stderr, "%s: surface de l'image = %ld pixels\n", __func__, surface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (x=0; x<TAILLE; x++) {
|
for (x=0; x<TAILLE; x++) {
|
||||||
@ -112,7 +114,7 @@ for (x=0; x<img->width; x++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG_LEVEL
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, " Map4bits: compte maximum = %ld\n", maxi);
|
fprintf(stderr, "%s: compte maximum = %ld\n", __func__, maxi);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include "../tthimage.h"
|
#include "../tthimage.h"
|
||||||
|
|
||||||
|
#define DEBUG_LEVEL 1
|
||||||
|
|
||||||
/*::------------------------------------------------------------------::*/
|
/*::------------------------------------------------------------------::*/
|
||||||
/*
|
/*
|
||||||
* ATTENTION: cette fonction sert à faire des essais, et ne doit
|
* ATTENTION: cette fonction sert à faire des essais, et ne doit
|
||||||
@ -16,8 +18,7 @@
|
|||||||
*
|
*
|
||||||
* n is the number of wanted colors
|
* n is the number of wanted colors
|
||||||
*/
|
*/
|
||||||
int
|
int Image_essai_col_reduce(Image_Desc *src, Image_Desc *dst, int n, int t)
|
||||||
Image_essai_col_reduce(Image_Desc *src, Image_Desc *dst, int n, int t)
|
|
||||||
{
|
{
|
||||||
RGB_map map;
|
RGB_map map;
|
||||||
int foo;
|
int foo;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "../tthimage.h"
|
#include "../tthimage.h"
|
||||||
|
@ -53,7 +53,7 @@ else
|
|||||||
|
|
||||||
Image_start_chrono("Essai", 0);
|
Image_start_chrono("Essai", 0);
|
||||||
|
|
||||||
for (idx=0; idx<3; idx++) {
|
for (idx=0; idx<10; idx++) {
|
||||||
foo = Test_Egalisations(fichier, 0);
|
foo = Test_Egalisations(fichier, 0);
|
||||||
fprintf(stderr, " essai egalisation -> %d\n", foo);
|
fprintf(stderr, " essai egalisation -> %d\n", foo);
|
||||||
foo = Essai_Televisions(fichier, 10);
|
foo = Essai_Televisions(fichier, 10);
|
||||||
@ -68,6 +68,8 @@ for (idx=0; idx<3; idx++) {
|
|||||||
fprintf(stderr, " essai classif -> %d\n", foo);
|
fprintf(stderr, " essai classif -> %d\n", foo);
|
||||||
foo = Test_des_warpings(fichier, 0);
|
foo = Test_des_warpings(fichier, 0);
|
||||||
fprintf(stderr, " essai warping -> %d\n", foo);
|
fprintf(stderr, " essai warping -> %d\n", foo);
|
||||||
|
foo = Essai_color_2_map(fichier, idx);
|
||||||
|
fprintf(stderr, " essai col2map -> %d\n", foo);
|
||||||
|
|
||||||
|
|
||||||
fprintf(stderr, "\n*************** %s: fin passe %d ******\n\n",
|
fprintf(stderr, "\n*************** %s: fin passe %d ******\n\n",
|
||||||
@ -76,8 +78,6 @@ for (idx=0; idx<3; idx++) {
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
foo = Essai_color_2_map(fichier, idx);
|
|
||||||
fprintf(stderr, " essai col2map -> %d\n", foo);
|
|
||||||
|
|
||||||
foo = test_du_jpeg_reader("in.jpeg");
|
foo = test_du_jpeg_reader("in.jpeg");
|
||||||
fprintf(stderr, " essai lecture jpeg -> %d\n", foo);
|
fprintf(stderr, " essai lecture jpeg -> %d\n", foo);
|
||||||
|
Loading…
Reference in New Issue
Block a user