【问题标题】:Mirroring Picturebox Image in C#在 C# 中镜像 Picturebox 图像
【发布时间】:2014-08-06 05:04:54
【问题描述】:

我有这样的问题。我想得到这个结果

我在左侧有图像,我想获得如右侧所示的结果。我有一个Picturebox,我的问题是如何将图像作为镜像旋转到右侧?
我在这个网站上看到了这个答案:

capturebox.BackgroundImage.RotateFlip(RotateFlipType.Rotate180FlipY);

但这不是正确的解决方案。感谢您的帮助

【问题讨论】:

  • 我想的Winforms?
  • 哦抱歉忘记写了,是的:)
  • 为什么RotateFlip 不对?它根本不起作用还是没有按预期工作?
  • 已经解决了,我正在翻转 BackgroundImage,但我也只翻转了图像 :) 谢谢 Franck

标签: c# winforms picturebox mirroring


【解决方案1】:

您需要在 PictureBox 之外使用 Image 进行操作

 private void button1_Click(object sender, EventArgs e)
    {
        Image img = pictureBox1.Image;
        img.RotateFlip(RotateFlipType.Rotate90FlipNone);
        pictureBox1.Image = img;
    }

你有一个例子HERE

【讨论】:

  • 加上因为你介绍了最简单的方法
猜你喜欢
  • 1970-01-01
  • 2016-11-10
  • 1970-01-01
  • 2011-11-15
  • 1970-01-01
  • 2019-05-31
  • 2016-12-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多