日期:2014-05-17  浏览次数:20954 次

c#和kodak的imgedit,做图像的缩放、旋转、裁剪、显示的问题
请问,我用imgedit+c#做图片旋转,this.axImgEdit1.RotateRight(90)没法执行,提示错误信息:未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 mscorlib.dll 中。
其他信息: 非法的选项指定。
Unable to rotate the image 90 degrees to the right.

那我怎么旋转啊?我把90换成“RotateFlipType.Rotate90FlipX”,一样出错,怎么弄?帮帮忙,各位大虾。
还有一个问题,我怎么在axImgEdit1空间中,指定显示图片的长宽,让图片显示成适合大小,谢谢。

------解决方案--------------------
如果只旋转,直接旋转Graphic 对象就行了
C# code
Graphics g = e.Graphics;
g.Rotate(90); //好像是这个函数

------解决方案--------------------
楼主,我同事想到办法了,form里面加个panel,panel里面加个picturebox,然后picturebox的SizeMode = PictureBoxSizeMode.StretchImage,然后用Bitmap对象的RotateFlip(RotateFlipType.Rotate90FlipNone)右旋90度。ok??