[Clipart] [Cctools-cchost] function for generating png thumbnails from svg files
roan at horning.us
Sat Nov 10 22:29:01 PST 2007
> Cool...if you put it up on there and jump into #openclipart on
> irc.freenode.net I'll help
Sorry I missed you on irc. Have the code working for svg, but it
crapped out on me when I tried to thumbnail an svgz file.
I've put the code on the test.openclipart.org in the
"/var/www/test.openclipart.org/htdocs/cclib/" directory. It is called
I wasn't sure how to hook this into cchost. To test it, I put a copy of
the code outside of the cchost structure on my web server, and called it
directly. To do this I put the following code at the top of the page
before the class definition:
$file = "discrete_vs_linear.svgz";
$size = "128";
$tn = new CCResampler($file);
print "<p>Height:" . $tn->QueryHeight() . "<br>";
print "Width:" . $tn->QueryWidth() . "<br>";
print "Length:" . $tn->QueryLength() . "<br>";
print "Long Side:" . $tn->QueryLongSide() . "</p>";
When I run the code calling the test-3stars.svg file, it works fine.
When I call it running the discrete_vs_linear.svgz file I got an array
error from getid3 (or maybe it is a more general php error).
I just uploaded the discrete_vs_linear.svgz to my test cchost
installation, and that worked. It uses the same getID3 library that I
call above--so I didn't break getID3.
I think it has something to do with the way I'm creating a getID3 object
in the CCResampler class.
Blah, my brain is fried for tonight.
More information about the clipart