Is there a decent vector / spline library for php?

跟風遠走 提交于 2019-12-12 01:32:32

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2658105/is-there-a-decent-vector-spline-library-for-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!