C# 中的反转 Picturebox 图像

发布于 2024-10-02 17:37:33 字数 274 浏览 0 评论 0原文

我想让程序中的一个按钮将图片框的背景图像翻转 180 度,使其面向另一个方向。所以请我有一些代码。我尝试使用这段代码: capturebox.BackgroundImage.RotateFlip = 180; 但这是错误的,程序无法编译,请帮忙。

谢谢

编辑

是的,抱歉,我的意思是镜像,基本上面向另一个方向,所以例如左手击球手的照片可以是镜子,所以它看起来像他们是板球比赛中的右手击球手。我希望这个例子有帮助。

谢谢

I want to make a button in my program flip the backgroundimage of the picturebox by 180 degrees so its facing the other way. So please can i have some code for this. I tried using this code:
capturebox.BackgroundImage.RotateFlip = 180;
but this is wrong and the program doesn't compile, please help.

Thanks

Edit

Yeah, sorry, i meant a mirror image, basically facing the other way, so for example a picture of a left handed batsmen could then be mirror so it looks like they are a right handed batsmen in cricket. I hope this example helps.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莳間冲淡了誓言ζ 2024-10-09 17:37:33

尝试

capturebox.BackgroundImage.RotateFlip(RotateFlipType.Rotate180FlipY);

Try

capturebox.BackgroundImage.RotateFlip(RotateFlipType.Rotate180FlipY);
骑趴 2024-10-09 17:37:33

“旋转 180 度”将使图片上下颠倒。我猜你想“镜像”图像?

无论如何, RotateFlip 方法不采用一定程度,它从 RotateFlipType 枚举。

"Rotate 180 degrees" will set the picture upside down. I guess you want to "mirror" the image?

Anyway, the RotateFlip method doesn't take a number of degrees, it takes an value from the RotateFlipType enumeration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文