以编程方式绘制半径图像
目前,我们的网站部门有一个流程,他们手动将每个图像的角半径调整为 +4%,以便为网络创建“更好”的图像。
他们目前使用 Serif Photoplus 的半径函数来执行此操作,我希望人们能够想出一种方法,以编程方式对整个图像文件夹执行此操作,最好使用开源或免费工具。
我知道我们可以使用 CSS 进行圆角化,但我尚未确信有一种简单的方法可以在所有浏览器和旧版浏览器中有效地实现此目的,尽管我对此持开放态度。
Currently our website department have a process where they manually radius the corners of each images to +4% to create "nicer" looking images for the web.
They currently do this using the radius function of Serif Photoplus, I was hoping people could think of a way to do this programmatically to a whole folder of images ideally using open source or free tools.
I'm aware we could do the radiusing with CSS, but I have yet to be convinced that there is an easy way to do this that is effective across all browsers and legacy browsers although I'm open to options in regard to this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 ImageMagick 将是适合这项工作的工具。
此帖子解释了如何在图像。似乎有很多方法可以做到这一点,这就是为什么我在这里没有列出特定的解决方案。 ImageMagick 还具有批处理功能,您可以将圆角应用到目录中的所有图像。
ImageMagick 在 Apache 2.0 许可证下分发,因此您可以免费将其用于商业目的。
I think ImageMagick would be the right tool for the job.
This thread explains how to make rounded corners on images. It seems there are many ways to do this, this is why I listed no particular solution here. ImageMagick also has a batch function, with that you can apply the corner rounding to all the images in a directory.
ImageMagick is distributed under the Apache 2.0 license, so you can use it freely for commercial purposes.
您可以手动完成,创建蒙版,然后添加图像。
Mathematica 中的示例:
You could do it by hand, creating a mask and then adding the images.
Example in Mathematica: