[Clipart] [Cctools-cchost] function for generating png thumbnails from svg files

Victor Stone fourstones.net at gmail.com
Wed Nov 7 17:36:14 PST 2007


On 11/4/07, Roan Horning <roan at horning.us> wrote:
> I see there are two PHP interfaces available for using ImageMagic:
> MagickWand for PHP and IMagick.

no that's worse, because now installations would likely have to
recompile their PHP to get those modules. Just go ahead and code with
exec but keep all of them wrapped and isolaed in one module.


>  > You want to watch for cchost events
>  > UPLOAD_DONE (to create the thing)
>  > UPLOAD_DELETE (to clear the cache)
>  > FILE_DONE (to watch for file adds/deletes/replaces)
>  >
> Not yet being that familiar with the cchost code, I was thinking of just
> adding a check for the existence of a thumbnail in
> pages/places/templates that return html thumbnail code.  If it doesn't
> exist, then it is created. Of course this could slow to a crawl a page
> which calls a number of thumbnails that don't exist.

If it takes more than 0.5 sec to create/cache 15 thumbs then I would
not recommend waiting until render-time to do that in the skin.
However (!) you could do it directly in the <img src="" attribute
which would not slow the actual page down. Personally I would look
hard at this option. Something like:

<img src="http://cchost_blah.com/media/getthumb?file_id=99999" />


VS



More information about the clipart mailing list