C#能不能实现这样的啊。

解决方案 »

  1.   

    可以实现,你可以看看这段代码,我先前也做了一个static  string picPath = "E:\\desert.jpg";//图片地址
            private void button1_Click(object sender, EventArgs e)
            {
                Bitmap bitmap = new Bitmap(picPath);
                //bitmap.RotateFlip(RotateFlipType.Rotate90FlipX);
                pictureBox1.Image = bitmap;
            }
            Bitmap bitmap = new Bitmap(picPath);
            /// <summary>
            /// 图片翻转
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            private void button2_Click(object sender, EventArgs e)
            {
                //Bitmap bitmap = new Bitmap(pictureBox1.Image);
                //bitmap.RotateFlip(RotateFlipType.Rotate180FlipX);
                Image image1 = pictureBox1.Image;
                image1.RotateFlip(RotateFlipType.Rotate90FlipX);
                pictureBox1.Image = image1;
            }
            /// <summary>
            /// 旋转图片
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            private void numericUpDown1_ValueChanged(object sender, EventArgs e)
            {
                if (numericUpDown1.Value>359.9m)
                {
                    numericUpDown1.Value = 0; 
                    return;
                }
                if (numericUpDown1.Value<0)
                {
                    numericUpDown1.Value = 359;
                    return;
                }
                Image oldImage = pictureBox1.Image;
                pictureBox1.Image = Utilities.RotateImage(bitmap, (float)numericUpDown1.Value);
                if (oldImage != null)
                {
                    oldImage.Dispose();
                }
            }有什么不懂的可以问我
      

  2.   

    也可以去看一下C#的 Graphics类   Bitmap 
    然后你就可以玩转图片了