private void BtnRotate_Click(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            String dgs = "", id = "";

            try
            {
                filename = filename.Substring(filename.IndexOf('*') + 1);
                //Image img=null;
                //img.Save(stream, ImageFormat.Jpeg);
                //resizedImage = bc.RotateImage(img);
                img1 = bc.RotateImage(img1);
                //img.Dispose();
                //if (File.Exists(filename))
                //{
                //    File.Delete(filename);
                //}
                //img1.Save(filename);
                //Bitmap bmp;
                //bmp = (Bitmap)img1;
                //bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg);
                //Image img2 = Image.FromFile(filename);
                pic1.Image = img1;
                //pnImg.Width = img1.
            }
            catch (Exception ex)
            {
                dgs = ex.Message;
            }
        }