【问题标题】:.net image editing algorithms.net 图像编辑算法
【发布时间】:2011-03-24 19:19:55
【问题描述】:

我想要一个能够为图像添加软边框的 .net(或本机)代码。

例如:

初始图像

变换后的图像:

我是用 Word 2010 做的,但我确信有一个 C++ 或 .net 库可以做同样的事情。

如果你熟悉一些可以做到这一点的代码,请告诉我。

谢谢。

【问题讨论】:

标签: .net image editing


【解决方案1】:

最简单的方法是创建一个从白色渐变为透明的图像,然后将其绘制在图像之上。喜欢:

using (Bitmap b = (Bitmap)Image.FromFile("frame.png")) {
  using (Graphics g = Graphics.FromImage(theImage)) {
    g.DrawImage(b, 0, 0, theImage.Width, theImage.Height);
  }
}

【讨论】:

    【解决方案2】:

    【讨论】:

    • 我已经设法在 ImageMagick 中找到所需的效果。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2020-03-29
    • 2011-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    相关资源
    最近更新 更多