php 有一个像样的矢量/样条库吗?

发布于 2024-08-29 13:38:36 字数 236 浏览 1 评论 0原文

有谁知道将干净的矢量渲染成 php 图像然后将其作为 jpeg/png 的最佳方法吗?

具体来说,我想绘制抗锯齿的线条、多边形和样条线,然后将它们作为 jpeg 提供。渲染时最好也带有 alpha 选项。

令人惊叹的是一个与 Raphael 具有类似 API 的 php 库(没有动画) - 不仅因为 Raphael 有一个很棒的 AP​​I,而且因为我已经在我的网站上使用它来实现动态位,但还需要烘焙 jpeg并行静态消耗。

Does anyone know of the best way to render clean vectors into a php image and then serve it as a jpeg/png?

Specifically I want to draw lines, polygons and splines which are anti-aliased and then serve them up as jpegs. Preferably also with an alpha option when rendering.

What would be spectacular is a php library with a similar API to Raphael (without the animation) - not only because Raphael has a great API but also because I'm already using it on my website for the dynamic bits but also need to bake jpeg's in parallel for static consumption.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东走西顾 2024-09-05 13:38:36

Imagemagick 可用于 PHP。请参阅 IMagickDraw 类 (http://php.net/imagick)。顺便说一句,据我所知,JPEG 中没有 Alpha 选项,只有 RGB 颜色。

Imagemagick is available for PHP. See the IMagickDraw class (http://php.net/imagick). Btw, AFAIK, there is no alpha option in JPEG, only RGB colors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文