Loosing image quality while changing format of image
===

hi I am working on changing all image formats into .gif format . but its loosing its quality after changing to a new format . I used folloeing code for change formats .`String paths = HttpContext.Current.Request.PhysicalApplicationPath + "DesktopModules\\DNAiusParallelSlider\\Images\\"+ModuleId.ToString()+"\\";
            if (FileUpload2.HasFile)
            {
                string extension = Path.GetExtension(FileUpload2.PostedFile.FileName);
                FileUpload2.SaveAs(paths + "waves" + extension);
                System.Drawing.Image image1 = System.Drawing.Image.FromFile(@paths + "\\waves" + extension);
                System.Drawing.Image img = System.Drawing.Image.FromFile(@paths + "\\waves" + extension);
                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Bmp))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Png))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }

                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Tiff))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Emf))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
                if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Wmf))
                {
                    image1.Save(@paths + "\\waves.gif", System.Drawing.Imaging.ImageFormat.Gif);
                }
                // Save the image in PNG format.

            }`