Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: would these third party libraries / helpers solve any problems? #1912

Open
petecooper opened this issue Feb 19, 2024 · 8 comments
Open
Labels

Comments

@petecooper
Copy link
Member

petecooper commented Feb 19, 2024

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.

@petecooper petecooper added the rfc label Feb 19, 2024
@Bloke
Copy link
Member

Bloke commented Feb 20, 2024

Well, dang, that's a very neat tool. Can we use it, pretty please? Can we, can we?

@petecooper petecooper changed the title RFC: would htmz solve any problems? RFC: would these third party libraries / helpers solve any problems? Jun 3, 2024
@petecooper
Copy link
Member Author

One more to consider - a PHP HTTP client (MIT):

https://github.com/guzzle/guzzle/

@petecooper
Copy link
Member Author

Adding Imageflow to the list: https://github.com/imazen/imageflow

@petecooper
Copy link
Member Author

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+.

@Bloke
Copy link
Member

Bloke commented Aug 21, 2024

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?

@petecooper
Copy link
Member Author

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.

@Bloke
Copy link
Member

Bloke commented Aug 21, 2024

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.

@petecooper
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants