views:

29

answers:

1

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.

A: 

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.

cottondave1