textpattern
textpattern copied to clipboard
RFC: would these third party libraries / helpers solve any problems?
https://github.com/Kalabasa/htmz https://leanrada.com/htmz/
This may be a tool looking for a problem that doesn't exist for us, but it's 166 bytes that might save some cruft elsewhere.
Well, dang, that's a very neat tool. Can we use it, pretty please? Can we, can we?
One more to consider - a PHP HTTP client (MIT):
https://github.com/guzzle/guzzle/
Adding Imageflow to the list: https://github.com/imazen/imageflow
libvips: https://github.com/libvips/libvips
… and the associated PHP bindings: https://github.com/libvips/php-vips
libvips is a demand-driven, horizontally threaded image processing library. Compared to similar libraries, libvips runs quickly and uses little memory. libvips is licensed under the LGPL 2.1+.
They forgot one important line:
libvips is also mahoosive.
:O
It's a 45MB download, uncompressed. And there's also this curious statement about integrating it with ImageMagick:
If available, libvips adds support for loading and saving all libMagick-supported image file types. You can enable and disable load and save separately... If you are going to be using libvips with untrusted images, perhaps in a web server, for example, you should consider the security implications of enabling a package with such a large attack surface.
Is that in relation to their own tool or are they saying ImageMagick itself is potentially dangerous?!
I'd respectfully disregard this tool for Txp uses, unless you're thinking it would be useful for image processing on the demo server or docs or something?
My take was rather more simplistic (perhaps overly so) - check if the server has libvips installed, use it…not literally packaging all the bits & pieces in our download. I haven't checked the size of the PHP bindings, that could be prohibitive.
Ah right, okay. Their API seems radically different to standard libraries that offer transforms and their list of operations include stuff we'd simply have no need for: colour-profile switching, bandwise image joining, fractal surfaces, histograms, pick most significant byte from image(?), ...
The php-vips library isn't too onerous (about 1MB) and I haven't grokked it yet so it might be worth a look if it adds anything we can use.
I have no attachment to it, to be honest - just laying it out as a potential. The src part of php-vips runs to about 300kB or so.