1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| int main () {
struct file *f = NULL;
struct file *tete = f;
struct file *aux = f;
/*on ouvre l'image (image magick)*/
MagickWandGenesis();
magick_wand=NewMagickWand();
status=MagickReadImage(magick_wand,"C:\\Users\\Utilisateur\\Desktop\\image_test.jpeg");
/* Pour récupérer la hauteur et la largeur de l'image*/
width = MagickGetImageWidth(magick_wand);
height = MagickGetImageHeight(magick_wand);
printf("\n width = %d\n height = %d\n",width,height);
if (f == NULL){ //initialisation des 8 premiers points
printf("\n f est nul\n");
//coordonnées du point central de l'image
X_milieu = width/2;
Y_milieu = height/2;
f = new_point (X_milieu+1,Y_milieu+1,0,NULL);
tete = f; //pour pouvoir rattacher la dernière cellule de la file à la première pour en faire une file circulaire
aux = f;
printf(" width : %d, height : %d\n",f->x,f->y);
couleur = MagickGetImagePixelColor(magick_wand,f->x,f->y,color);
printf("couleur %p\n",couleur); |
Partager