On Wednesday 21 November 2007, Dave M G wrote: > Larry, > > Thank you for responding. > > > I think you missed the point. SVG is just text. ... There's no need > > for SVG support per se, as SimpleXML provides all you need anyway. > > I did miss the point - thanks for setting me straight. > > However, I'm still unsure about using SVGs. On the one hand, what I'm > using as source files are originally in SVG format and I want to be able > to dynamically resize and scale them without loss of clarity. That sounds like an excellent reason to use SVG for your image manipulation. > But, after they have been resized and scaled, then I think I need to > send the resulting image to the browser in some raster image format. > Indications are that SVG support on browsers is still not as uniform as > PNG or other raster graphics formats. Yeah, Firefox is the only browser I know of with native SVG support worth a damn. Konqueror keeps talking about it but I don't know if it's any good yet. Not sure about Opera or Safari. IE requires a plugin from Adobe, which the last time I was playing with it (which has been a while, but there were no signs of plans to improve it at the time) was OK, but not great and embedded a la flash in a fixed, immutable box. > At that last step, assuming that I have manipulated the images to my > satisfaction with SimpleXML, can I then output the result in PNG or JPG > with PHP? With native PHP, I don't believe so. However, I know that there are assorted command line tools and Java tools to do so. I naturally can't think of them off the top of my head, but I know they exist. You could exec() out to them to cache the rasterized combined image to disk and then serve that. I don't know off hand if there's a PECL module or some user-space PHP code to do that. It's worth spending 10 min Googling it, though. > I'm not so sure this can be done. The tricky part is that I am building > PHP scripts that could be deployed on servers with different PHP > settings, so I'm not confident that I can rely on PEAR or ImageMagick > functions being present. Are they standard on PHP > 5? Now that could be a problem. You'd have to find either some PHP user-space library or a CLI C library that you could bundle with the app. I'm fairly certain nothing like that is in stock PHP 5. As for finding a good such library, as I said Google would know better than I. (Or maybe I should say Yahoo, since they use PHP. <g>) > Forgive me if my questions are clueless to the point of making the > questions unclear. They make a lot more sense now, actually. :-) -- Larry Garfield AIM: LOLG42 larry@xxxxxxxxxxxxxxxx ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php