回复 6楼jerachen的帖子
LEADTOOLS Imaging Pro 图片旋转请使用:
- RasterCodecs codecs = new RasterCodecs();
- string srcFileName = Path.Combine(ImagesPath.Path, "Image1.cmp");
- string destFileName = Path.Combine(ImagesPath.Path, "RotateCommand.bmp");
- // Load the source image from disk
- RasterImage image = codecs.Load(srcFileName);
- // Rotate the image by 45 degrees
- RotateCommand command = new RotateCommand();
- command.Angle = 45 * 100;
- command.FillColor = new RasterColor(255, 255, 255);
- command.Flags = RotateCommandFlags.Bicubic;
- command.Run(image);
- // Save it to disk
- codecs.Save(image, destFileName, RasterImageFormat.Bmp, 24);
- // Clean Up
- image.Dispose();
- codecs.Dispose();
复制代码 |