本帖最后由 Richard.Ma 于 2017-2-15 14:50 编辑
可以参考如下代码,需要居中的话对坐标进行计算即可
//克隆图片
RasterImage sourceimage= image.Clone();
//合并图片
CombineCommand command = new CombineCommand();
command.SourceImage = sourceimage;
// the rectangle that represents the affected area of the destination image.
command.DestinationRectangle = new LeadRect(640, 360, 150,150);
// The source point, which represents the source point of the source image which is to be combined.
command.SourcePoint = new LeadPoint(640,360);
// the operations that will be performed to produce the result, and the channel that will be used to achieve this result.
command.Flags = CombineCommandFlags.OperationAdd | CombineCommandFlags.Destination0;// | CombineCommandFlags.SourceRed | CombineCommandFlags.DestinationGreen | CombineCommandFlags.ResultBlue;
command.Run(image);
|