以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]图片旋转代码(已解决) (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=130969) |
-- 作者:yyzlxc -- 发布时间:2019/2/13 11:49:00 -- [求助]图片旋转代码(已解决) 控件PictureViewer更换为PictureBox,下面的图片旋转代码如何修改,请各位老师指教,谢谢!! Dim zp As WinForm.PictureViewer = Forms("窗口").Controls("PictureViewer1") Dim str As String = zp.SelectedItem Dim bmp As New bitmap(str) bmp.RotateFlip(RotateFlipType.Rotate90FlipNone) bmp.save(str) Dim obj As object = Forms("窗口").Controls("PictureViewer1").basecontrol.Controls(0) Dim pic As Object = obj.panel1.controls("PictureSplitContainer").Panel1.controls("panel2").controls("C1PictureBox1") pic.Image = bmp
[此贴子已经被作者于2019/2/13 13:47:44编辑过]
|
-- 作者:有点甜 -- 发布时间:2019/2/13 11:56:00 -- Dim p As winform.picturebox = Forms("窗口1").Controls("Picturebox1") Dim bmp As New bitmap(p.image) bmp.RotateFlip(RotateFlipType.Rotate90FlipNone) p.image = bmp |
-- 作者:yyzlxc -- 发布时间:2019/2/13 12:25:00 -- 谢谢甜老师的指教,如何保存旋转后的图片(再次打开显示旋转后的图片),还请指教,谢谢!! |
-- 作者:有点甜 -- 发布时间:2019/2/13 12:33:00 -- 以下是引用yyzlxc在2019/2/13 12:25:00的发言:
谢谢甜老师的指教,如何保存旋转后的图片(再次打开显示旋转后的图片),还请指教,谢谢!!
Dim p As winform.picturebox = Forms("窗口1").Controls("Picturebox1") bmp.save("d:\\test.jpg") |
-- 作者:yyzlxc -- 发布时间:2019/2/13 13:47:00 -- 问题解决,谢谢甜老师!! |