旋转位图图像
我想旋转位图图像,我编写了一些代码并且它可以工作
TransformedBitmap TempImage = new TransformedBitmap();
TempImage.BeginInit();
TempImage.Source = MyImageSource; // MyImageSource of type BitmapImage
RotateTransform transform = new RotateTransform(90);
TempImage.Transform = transform;
TempImage.EndInit();
image1.Source = TempImage;
,但我希望 MyImageSource 得到此修改,因为像这样,如果我再次单击按钮,则不会发生任何事情,并且正常情况下它会得到我的图像的第一种形式,而且我希望它采用这种形式,因为我必须在修改后保存它。
为什么我必须这样做:
我有一些 tiff 图像要读取,其中一些可能不是正确的形式我想添加翻转 90° 用户单击它,直到图像返回到正确的形式,当他单击翻转时图像将以用户选择的实际形式保存(替换)在磁盘上
I want to rotate a bitmap image I wrote some code and it work
TransformedBitmap TempImage = new TransformedBitmap();
TempImage.BeginInit();
TempImage.Source = MyImageSource; // MyImageSource of type BitmapImage
RotateTransform transform = new RotateTransform(90);
TempImage.Transform = transform;
TempImage.EndInit();
image1.Source = TempImage;
but I want that MyImageSource get this modification, because like that if I click again in the button nothing happen and this normal it get the first form of my image, and also I want it to take this form because I have to save it after modification.
why I have to do this:
I have some tiff image to read some of them can be not in the right form I want to add flip 90° the user click on it until the image return to the right form and when he click on flip the image will be saved(replaced) on disk in the actual form chosen by user
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个怎么样:
How about this:
这个怎么样?
How about this?