public static void GererImage(GestionImage gestionImage)
        {
            Random randNum = new Random();

            if (enCour)
            {
                return;
            }
            if (transiImageenCour)
            {
                return;
            }
            enCour = true;

            compteur++;
            if (compteurTransformation > 5)
            {
                transiImageenCour = true;
                getImageRandom();
                gestionImage.transitionEntreImage(getImageRandom());
                compteurTransformation = 0;
                return;
            }

            double valGravcheckGrave = checkGrave();
            double valGravcheckMoy   = checkMoy();
            double valGravcheckAigue = checkAigue();

            /* if (valGravcheckAigue != 0 && valGravcheckMoy != 0)
             * {
             *   Form2.timer_gif_explosion.Start();
             * }*/
            /*if (valGravcheckAigue != 0)
             * {
             *  Form2.timer_gif_pluie.Start();
             * }*/

            Bpm = Son.getBpm();
            if (valGravcheckGrave != 0)
            {
                if (valGravcheckAigue < 10)
                {
                    flip = true;
                }
                else if (valGravcheckGrave > 10 && valGravcheckGrave <= 75)
                {
                    flop = true;
                }
                else if (valGravcheckGrave > 75 && valGravcheckGrave <= 150)
                {
                    edge = true;
                }
                else if (valGravcheckGrave > 150 && valGravcheckGrave <= 200)
                {
                    flou = true;
                }
            }
            else if (valGravcheckMoy != 0)
            {
                if (valGravcheckMoy > 200 && valGravcheckMoy <= 300)
                {
                    lumino = true;
                }
                else if (valGravcheckMoy > 300 && valGravcheckMoy <= 500)
                {
                    polar = true;
                }
                else if (valGravcheckMoy > 500 && valGravcheckMoy <= 700)
                {
                    arc = true;
                }
                else if (valGravcheckMoy > 700 && valGravcheckMoy <= 1000)
                {
                    contrast = true;
                }
                else if (valGravcheckMoy > 1000 && valGravcheckMoy <= 1500)
                {
                    coul = true;
                }
                else if (valGravcheckMoy > 1500 && valGravcheckMoy <= 2000)
                {
                    negate = true;
                }
            }
            else if (valGravcheckAigue != 0)
            {
                differe = true;
            }


            if (flip)
            {
                compteurTransformation++;
                Console.WriteLine("flip");
                gestionImage.modifierImage("flip");
            }
            else if (flop)
            {
                Console.WriteLine("flop");
                compteurTransformation++;
                gestionImage.modifierImage("flop");
            }
            else if (negate)
            {
                Console.WriteLine("negate");
                compteurTransformation++;
                gestionImage.modifierImage("negate");
            }
            else if (gris)
            {
                Console.WriteLine("gris");
                compteurTransformation++;
                gestionImage.modifierImage("gris");
            }
            else if (flou)
            {
                Console.WriteLine("flou");
                compteurTransformation++;
                gestionImage.modifierImage("flou");
            }
            else if (polar)
            {
                Console.WriteLine("polar");
                compteurTransformation++;
                gestionImage.modifierImage("polar");
            }
            else if (differe)
            {
                Console.WriteLine("differe");
                compteurTransformation++;
                var image2 = new MagickImage();
                image2.Read(getImageRandom());
                gestionImage.modifierImage("differe", image2);
            }
            else if (lumino)
            {
                Console.WriteLine("lumino");
                compteurTransformation++;
                gestionImage.modifierImage("lumino", (int)(valGravcheckMoy / moyMoy) / 4);
            }
            else if (contrast)
            {
                Console.WriteLine("contrast");
                compteurTransformation++;
                gestionImage.modifierImage("contrast", (int)(valGravcheckMoy / moyMoy));
            }
            else if (arc)
            {
                Console.WriteLine("arc");
                compteurTransformation++;
                gestionImage.modifierImage("arc", 5);
            }
            else if (rotate)
            {
                Console.WriteLine("rotate");
                compteurTransformation++;
                gestionImage.modifierImage("rotate", 2);
            }
            else if (edge)
            {
                Console.WriteLine("edge");
                compteurTransformation++;
                gestionImage.modifierImage("edge", (int)(valGravcheckMoy / moyMoy) / 2);
            }
            else if (coul)
            {
                Console.WriteLine("coul");
                compteurTransformation++;
                gestionImage.modifierImage("coul", new MagickColor((ushort)randNum.Next(255), (ushort)randNum.Next(255), (ushort)randNum.Next(255)), new MagickColor((ushort)randNum.Next(255), (ushort)randNum.Next(255), (ushort)randNum.Next(255)));
            }
            else if (cut)
            {
                Console.WriteLine("cut");
                compteurTransformation++;
                gestionImage.modifierImage("cut");
            }

            valGravcheckGrave = 0;
            valGravcheckMoy   = 0;
            valGravcheckAigue = 0;
            enCour            = false;
        }